From 275db3ba6239fd4bf00182b788fea401d346f6b2 Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Wed, 16 May 2007 15:06:59 -0500 Subject: [PATCH] --- yaml --- r: 56551 b: refs/heads/master c: 3b6330ce2a3e1f152f79a6203f73d23356e243a7 h: refs/heads/master i: 56549: 94df69bd39be3dce37ba64ac1e2e5cabdf91633c 56547: 4b6b0c57d812185c820f231c319a5d8c1cd857f7 56543: dbfa825376f29dfaab83b1b37b2589e5bf3dc9d1 v: v3 --- [refs] | 2 +- trunk/drivers/net/gianfar.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 141d1b833146..2c80d084148c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dbf2e8585971f2a8b1f60a188dc245fd2f8f81b3 +refs/heads/master: 3b6330ce2a3e1f152f79a6203f73d23356e243a7 diff --git a/trunk/drivers/net/gianfar.c b/trunk/drivers/net/gianfar.c index b666a0cc0642..f5b3cba23fc5 100644 --- a/trunk/drivers/net/gianfar.c +++ b/trunk/drivers/net/gianfar.c @@ -1025,6 +1025,15 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev) dev->trans_start = jiffies; + /* The powerpc-specific eieio() is used, as wmb() has too strong + * semantics (it requires synchronization between cacheable and + * uncacheable mappings, which eieio doesn't provide and which we + * don't need), thus requiring a more expensive sync instruction. At + * some point, the set of architecture-independent barrier functions + * should be expanded to include weaker barriers. + */ + + eieio(); txbdp->status = status; /* If this was the last BD in the ring, the next one */ @@ -1301,6 +1310,7 @@ struct sk_buff * gfar_new_skb(struct net_device *dev, struct rxbd8 *bdp) bdp->length = 0; /* Mark the buffer empty */ + eieio(); bdp->status |= (RXBD_EMPTY | RXBD_INTERRUPT); return skb; @@ -1484,6 +1494,7 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit) bdp = priv->cur_rx; while (!((bdp->status & RXBD_EMPTY) || (--rx_work_limit < 0))) { + rmb(); skb = priv->rx_skbuff[priv->skb_currx]; if (!(bdp->status &