diff options
author | Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> | 2011-03-07 03:09:17 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-07 15:26:58 -0800 |
commit | 63fcb27fdce614ac1b7cc6251bfcb7077f3002b3 (patch) | |
tree | 8969d7a39710d3e294888ade9482d329650f160b /drivers/net/benet | |
parent | d8a29d315969b0edbf4a37a1a91c361e222909a2 (diff) | |
download | op-kernel-dev-63fcb27fdce614ac1b7cc6251bfcb7077f3002b3.zip op-kernel-dev-63fcb27fdce614ac1b7cc6251bfcb7077f3002b3.tar.gz |
be2net: Disarm CQ and EQ to disable interrupt in Lancer
For Lancer disable interrupts in close by disarming CQs and EQs.
Change the order of calls in be_close to achieve the correct result.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Subramanian Seetharaman <subbu.seetharaman@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet')
-rw-r--r-- | drivers/net/benet/be_main.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 68b9d17..a7fd833 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c @@ -2088,6 +2088,18 @@ static int be_close(struct net_device *netdev) if (!lancer_chip(adapter)) be_intr_set(adapter, false); + for_all_rx_queues(adapter, rxo, i) + napi_disable(&rxo->rx_eq.napi); + + napi_disable(&tx_eq->napi); + + if (lancer_chip(adapter)) { + be_cq_notify(adapter, adapter->tx_obj.cq.id, false, 0); + be_cq_notify(adapter, adapter->mcc_obj.cq.id, false, 0); + for_all_rx_queues(adapter, rxo, i) + be_cq_notify(adapter, rxo->cq.id, false, 0); + } + if (adapter->msix_enabled) { vec = be_msix_vec_get(adapter, tx_eq); synchronize_irq(vec); @@ -2101,11 +2113,6 @@ static int be_close(struct net_device *netdev) } be_irq_unregister(adapter); - for_all_rx_queues(adapter, rxo, i) - napi_disable(&rxo->rx_eq.napi); - - napi_disable(&tx_eq->napi); - /* Wait for all pending tx completions to arrive so that * all tx skbs are freed. */ |