lkml.org 
[lkml]   [2013]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/21] NTB: correct memory barrier
Date
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>
---
drivers/ntb/ntb_transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
index 1d17857..e9666bd 100644
--- a/drivers/ntb/ntb_transport.c
+++ b/drivers/ntb/ntb_transport.c
@@ -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);
--
1.7.9.5


\
 
 \ /
  Last update: 2013-01-19 10:41    [W:0.217 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site