Patchwork [09/19] Revert "UBUNTU: SAUCE: net: calxedaxgmac: add write barriers around setting owner bit"

login
register
mail settings
Submitter Ike Panhc
Date Oct. 1, 2012, 10:02 a.m.
Message ID <1349085737-23399-1-git-send-email-ike.pan@canonical.com>
Download mbox | patch
Permalink /patch/188259/
State New
Headers show

Comments

Ike Panhc - Oct. 1, 2012, 10:02 a.m.
From: Rob Herring <rob.herring@calxeda.com>

BugLink: http://launchpad.net/bugs/1059432

This reverts commit 585c5d2b2475f2c97886ad80e329368baf5f3bdb.

Signed-off-by: Ike Panhc <ike.pan@canonical.com>
---
 drivers/net/ethernet/calxeda/xgmac.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Patch

diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c
index 8f43dc4..cd64c6b 100644
--- a/drivers/net/ethernet/calxeda/xgmac.c
+++ b/drivers/net/ethernet/calxeda/xgmac.c
@@ -332,7 +332,7 @@ 
 #define DESC_BUFFER2_SZ_OFFSET	16
 
 struct xgmac_dma_desc {
-	volatile __le32 flags;
+	__le32 flags;
 	__le32 buf_size;
 	__le32 buf1_addr;		/* Buffer 1 Address Pointer */
 	__le32 buf2_addr;		/* Buffer 2 Address Pointer */
@@ -451,20 +451,15 @@  static inline int desc_get_owner(struct xgmac_dma_desc *p)
 static inline void desc_set_rx_owner(struct xgmac_dma_desc *p)
 {
 	/* Clear all fields and set the owner */
-	wmb();
 	p->flags = cpu_to_le32(DESC_OWN);
-	wmb();
 }
 
 static inline void desc_set_tx_owner(struct xgmac_dma_desc *p, u32 flags)
 {
-	u32 tmpflags;
-	wmb();
-	tmpflags = le32_to_cpu(p->flags);
+	u32 tmpflags = le32_to_cpu(p->flags);
 	tmpflags &= TXDESC_END_RING;
 	tmpflags |= flags | DESC_OWN;
 	p->flags = cpu_to_le32(tmpflags);
-	wmb();
 }
 
 static inline int desc_get_tx_ls(struct xgmac_dma_desc *p)