diff options
author | Amit Kumar Salecha <amit.salecha@qlogic.com> | 2009-12-05 07:23:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-08 23:37:45 -0500 |
commit | f2251f668e9527b87c9ba7256e7497cb49abbc20 (patch) | |
tree | bd0bc74ed3490b817f0fc9f5336867d202d5af90 /drivers/net/netxen | |
parent | 6f7714196b4e01d7462df31d705c3ca53ecbdfc1 (diff) |
netxen:fix napi intr enable check
o netif_running() check for enabling interrupt at end of napi poll is
not enough to cover firmwar recovery. Instead test __NX_DEV_UP bit.
o Avoid re-entry into to netxen_nic_down() with __NX_DEV_UP bit check.
Acked-by: Dhananjay Phadke <dhananjay.phadke@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')
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 8ffb30bc798f..f4996846a234 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -1011,8 +1011,10 @@ __netxen_nic_down(struct netxen_adapter *adapter, struct net_device *netdev) | |||
1011 | if (adapter->is_up != NETXEN_ADAPTER_UP_MAGIC) | 1011 | if (adapter->is_up != NETXEN_ADAPTER_UP_MAGIC) |
1012 | return; | 1012 | return; |
1013 | 1013 | ||
1014 | clear_bit(__NX_DEV_UP, &adapter->state); | 1014 | if (!test_and_clear_bit(__NX_DEV_UP, &adapter->state)) |
1015 | return; | ||
1015 | 1016 | ||
1017 | smp_mb(); | ||
1016 | spin_lock(&adapter->tx_clean_lock); | 1018 | spin_lock(&adapter->tx_clean_lock); |
1017 | netif_carrier_off(netdev); | 1019 | netif_carrier_off(netdev); |
1018 | netif_tx_disable(netdev); | 1020 | netif_tx_disable(netdev); |
@@ -2053,7 +2055,7 @@ static int netxen_nic_poll(struct napi_struct *napi, int budget) | |||
2053 | 2055 | ||
2054 | if ((work_done < budget) && tx_complete) { | 2056 | if ((work_done < budget) && tx_complete) { |
2055 | napi_complete(&sds_ring->napi); | 2057 | napi_complete(&sds_ring->napi); |
2056 | if (netif_running(adapter->netdev)) | 2058 | if (test_bit(__NX_DEV_UP, &adapter->state)) |
2057 | netxen_nic_enable_int(sds_ring); | 2059 | netxen_nic_enable_int(sds_ring); |
2058 | } | 2060 | } |
2059 | 2061 | ||