projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0efc22f
)
bnx2x: change smp_mb() comment to conform the true
author
Stanislaw Gruszka
<
[email protected]
>
Tue, 9 Mar 2010 06:55:02 +0000
(06:55 +0000)
committer
David S. Miller
<
[email protected]
>
Mon, 15 Mar 2010 22:47:01 +0000
(15:47 -0700)
Access to fp->tx_bp_prod is protected by __netif_tx_lock,
smp_mb() is not needed for that.
Signed-off-by: Stanislaw Gruszka <
[email protected]
>
Signed-off-by: Eilon Greenstein <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/bnx2x_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/bnx2x_main.c
b/drivers/net/bnx2x_main.c
index ae62b67aa597bf163d9a006690c96ecac69f3a4a..6c042a72d6ccb0ef460bf5ad0700e3aedf7ff7ed 100644
(file)
--- a/
drivers/net/bnx2x_main.c
+++ b/
drivers/net/bnx2x_main.c
@@
-11428,9
+11428,12
@@
static netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (unlikely(bnx2x_tx_avail(fp) < MAX_SKB_FRAGS + 3)) {
netif_tx_stop_queue(txq);
- /* We want bnx2x_tx_int to "see" the updated tx_bd_prod
- if we put Tx into XOFF state. */
+
+ /* paired memory barrier is in bnx2x_tx_int(), we have to keep
+ * ordering of set_bit() in netif_tx_stop_queue() and read of
+ * fp->bd_tx_cons */
smp_mb();
+
fp->eth_q_stats.driver_xoff++;
if (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3)
netif_tx_wake_queue(txq);