diff options
author | Rajesh Borundia <rajesh.borundia@qlogic.com> | 2010-10-18 02:03:41 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-18 07:22:51 -0700 |
commit | 7a9905e64272c8021a8cfaf6015dd0fb8eeeb378 (patch) | |
tree | 085ccb214fcc14dd2589516bba768a7c23fcef0a /drivers/net/netxen/netxen_nic.h | |
parent | 3666e0b04f092f9d9da8a6d6a3820de6c870407c (diff) |
netxen: fix race in tx stop queue
There is race between netif_stop_queue and netif_stopped_queue
check.So check once again if buffers are available to avoid race.
With above logic we can also get rid of tx lock in process_cmd_ring.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen/netxen_nic.h')
-rw-r--r-- | drivers/net/netxen/netxen_nic.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 6dca3574e355..92f89af0720e 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h @@ -175,7 +175,10 @@ #define MAX_NUM_CARDS 4 #define MAX_BUFFERS_PER_CMD 32 -#define TX_STOP_THRESH ((MAX_SKB_FRAGS >> 2) + 4) +#define MAX_TSO_HEADER_DESC 2 +#define MGMT_CMD_DESC_RESV 4 +#define TX_STOP_THRESH ((MAX_SKB_FRAGS >> 2) + MAX_TSO_HEADER_DESC \ + + MGMT_CMD_DESC_RESV) #define NX_MAX_TX_TIMEOUTS 2 /* |