RE: [PATCH 1/1] qlcnic: add wmb() call in transmit data path.

From
Sony Chacko <hidden>
Date
2016-07-01 01:12:51
Reply to
Lino Sanfilippo, 2016-06-30
Subject: Re: [PATCH 1/1] qlcnic: add wmb() call in transmit data path.
quoted
+    /* Ensure writes are complete before HW fetches Tx descriptors */
+    wmb();
      qlcnic_update_cmd_producer(tx_ring);

      return NETDEV_TX_OK;
Would not an mmiowb be more appropriate in this case?

Regards,
Lino
Sorry, this was nonsense.This should be "dma_wmb" not "mmiowb".

Lino,

The patch is based on this kernel documentation. 

https://www.kernel.org/doc/Documentation/memory-barriers.txt
	
	/* force memory to sync before notifying device via MMIO */
		wmb();

		/* notify device of new descriptors */
		writel(DESC_NOTIFY, doorbell);
	}
The wmb() is needed to guarantee that the cache coherent memory writes have 
completed before attempting a write to the cache incoherent MMIO region.

Thanks,
Sony
Thread (6 messages) 6 messages, 3 authors, last reply 2016-07-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help