aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/tg3.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2012-03-21 15:38:33 +0000
committerDavid S. Miller <davem@davemloft.net>2012-03-21 21:57:36 -0400
commit7ae5289017e5ed5514b2603d157fb54c058a3c82 (patch)
tree3ab4c34f95aced979df8ad5e7be721996f5911b1 /drivers/net/ethernet/broadcom/tg3.h
parent5676cc7bfe1e388e87843f71daa229610385b41e (diff)
downloadvexpress-lsk-7ae5289017e5ed5514b2603d157fb54c058a3c82.tar.gz
tg3: Fix RSS ring refill race condition
The RSS feature in tg3 hardware has only one rx producer ring for all RSS rings. NAPI vector 1 is special and handles the refilling of the rx producer ring on behalf of all RSS rings. There is a race condition between these RSS NAPIs and the NAPI[1]. If NAPI[1] finishes checking for refill and then another RSS ring empties the rx producer ring before NAPI[1] exits NAPI, the chip will be completely out of SKBs in the rx producer ring. We fix this by adding a flag tp->rx_refill and rely on napi_schedule()/ napi_complete() to help synchronize it to close the race condition. Update driver version to 3.123. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/tg3.h')
-rw-r--r--drivers/net/ethernet/broadcom/tg3.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h
index 66bcfca5526..93865f899a4 100644
--- a/drivers/net/ethernet/broadcom/tg3.h
+++ b/drivers/net/ethernet/broadcom/tg3.h
@@ -3007,6 +3007,7 @@ struct tg3 {
u32 rx_std_max_post;
u32 rx_offset;
u32 rx_pkt_map_sz;
+ bool rx_refill;
/* begin "everything else" cacheline(s) section */