Skip to content

Commit

Permalink
GenWQE: Add wmb before DDCB is started
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Frank Haverkamp authored and Greg Kroah-Hartman committed Apr 16, 2014
1 parent 5c5e058 commit 68fe8ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/misc/genwqe/card_ddcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ static int enqueue_ddcb(struct genwqe_dev *cd, struct ddcb_queue *queue,
break;

new = (old | DDCB_NEXT_BE32);

wmb();
icrc_hsi_shi = cmpxchg(&prev_ddcb->icrc_hsi_shi_32, old, new);

if (icrc_hsi_shi == old)
Expand All @@ -314,6 +316,8 @@ static int enqueue_ddcb(struct genwqe_dev *cd, struct ddcb_queue *queue,
/* Queue must be re-started by updating QUEUE_OFFSET */
ddcb_mark_tapped(pddcb);
num = (u64)ddcb_no << 8;

wmb();
__genwqe_writeq(cd, queue->IO_QUEUE_OFFSET, num); /* start queue */

return RET_DDCB_TAPPED;
Expand Down

0 comments on commit 68fe8ac

Please sign in to comment.