aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/caam/jr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
index 53c8c51d5881..93d14070141a 100644
--- a/drivers/crypto/caam/jr.c
+++ b/drivers/crypto/caam/jr.c
@@ -63,7 +63,7 @@ static void caam_jr_dequeue(unsigned long devarg)
63 63
64 head = ACCESS_ONCE(jrp->head); 64 head = ACCESS_ONCE(jrp->head);
65 65
66 spin_lock_bh(&jrp->outlock); 66 spin_lock(&jrp->outlock);
67 67
68 sw_idx = tail = jrp->tail; 68 sw_idx = tail = jrp->tail;
69 hw_idx = jrp->out_ring_read_index; 69 hw_idx = jrp->out_ring_read_index;
@@ -115,7 +115,7 @@ static void caam_jr_dequeue(unsigned long devarg)
115 jrp->tail = tail; 115 jrp->tail = tail;
116 } 116 }
117 117
118 spin_unlock_bh(&jrp->outlock); 118 spin_unlock(&jrp->outlock);
119 119
120 /* Finally, execute user's callback */ 120 /* Finally, execute user's callback */
121 usercall(dev, userdesc, userstatus, userarg); 121 usercall(dev, userdesc, userstatus, userarg);
@@ -236,14 +236,14 @@ int caam_jr_enqueue(struct device *dev, u32 *desc,
236 return -EIO; 236 return -EIO;
237 } 237 }
238 238
239 spin_lock(&jrp->inplock); 239 spin_lock_bh(&jrp->inplock);
240 240
241 head = jrp->head; 241 head = jrp->head;
242 tail = ACCESS_ONCE(jrp->tail); 242 tail = ACCESS_ONCE(jrp->tail);
243 243
244 if (!rd_reg32(&jrp->rregs->inpring_avail) || 244 if (!rd_reg32(&jrp->rregs->inpring_avail) ||
245 CIRC_SPACE(head, tail, JOBR_DEPTH) <= 0) { 245 CIRC_SPACE(head, tail, JOBR_DEPTH) <= 0) {
246 spin_unlock(&jrp->inplock); 246 spin_unlock_bh(&jrp->inplock);
247 dma_unmap_single(dev, desc_dma, desc_size, DMA_TO_DEVICE); 247 dma_unmap_single(dev, desc_dma, desc_size, DMA_TO_DEVICE);
248 return -EBUSY; 248 return -EBUSY;
249 } 249 }
@@ -265,7 +265,7 @@ int caam_jr_enqueue(struct device *dev, u32 *desc,
265 265
266 wr_reg32(&jrp->rregs->inpring_jobadd, 1); 266 wr_reg32(&jrp->rregs->inpring_jobadd, 1);
267 267
268 spin_unlock(&jrp->inplock); 268 spin_unlock_bh(&jrp->inplock);
269 269
270 return 0; 270 return 0;
271} 271}