Skip to content

Commit 68fe8ac

Browse files
fhaverkampgregkh
authored andcommitted
GenWQE: Add wmb before DDCB is started
Needed to add wmb() before we send the DDCB for execution. Without the syncronizing it failed on System p. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5c5e058 commit 68fe8ac

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎drivers/misc/genwqe/card_ddcb.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ static int enqueue_ddcb(struct genwqe_dev *cd, struct ddcb_queue *queue,
305305
break;
306306

307307
new = (old | DDCB_NEXT_BE32);
308+
309+
wmb();
308310
icrc_hsi_shi = cmpxchg(&prev_ddcb->icrc_hsi_shi_32, old, new);
309311

310312
if (icrc_hsi_shi == old)
@@ -314,6 +316,8 @@ static int enqueue_ddcb(struct genwqe_dev *cd, struct ddcb_queue *queue,
314316
/* Queue must be re-started by updating QUEUE_OFFSET */
315317
ddcb_mark_tapped(pddcb);
316318
num = (u64)ddcb_no << 8;
319+
320+
wmb();
317321
__genwqe_writeq(cd, queue->IO_QUEUE_OFFSET, num); /* start queue */
318322

319323
return RET_DDCB_TAPPED;

0 commit comments

Comments
 (0)