Skip to content

Commit

Permalink
NTB: correct memory barrier
Browse files Browse the repository at this point in the history
mmiowb is not sufficient to flush the data and is causing data
corruption.  Change to wmb and the data corruption is no more.

Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jon Mason authored and Greg Kroah-Hartman committed Jan 20, 2013
1 parent 8222b40 commit 842c1dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ntb/ntb_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ static void ntb_tx_copy_task(struct ntb_transport_qp *qp,
hdr->ver = qp->tx_pkts;

/* Ensure that the data is fully copied out before setting the flag */
mmiowb();
wmb();
hdr->flags = entry->flags | DESC_DONE_FLAG;

ntb_ring_sdb(qp->ndev, qp->qp_num);
Expand Down

0 comments on commit 842c1dd

Please sign in to comment.