Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Kernel Team (http://www.linux-archive.org/ubuntu-kernel-team/)
-   -   Revert "UBUNTU: SAUCE: net: calxedaxgmac: add write barriers around setting owner bit" (http://www.linux-archive.org/ubuntu-kernel-team/708699-revert-ubuntu-sauce-net-calxedaxgmac-add-write-barriers-around-setting-owner-bit.html)

Ike Panhc 10-01-2012 10:02 AM

Revert "UBUNTU: SAUCE: net: calxedaxgmac: add write barriers around setting owner bit"
 
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(-)

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)
--
1.7.9.5


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team


All times are GMT. The time now is 03:29 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.