summaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_main.c
diff options
context:
space:
mode:
authorSathya Perla <sathyap@serverengines.com>2010-02-17 02:35:11 +0100
committerDavid S. Miller <davem@davemloft.net>2010-02-17 22:35:39 +0100
commit7a1e9b2059d147461cff3dfbabbfb43f296a1eef (patch)
tree96cede2e32bf278b86a06faab7c7940ee5d776b3 /drivers/net/benet/be_main.c
parentbe2net: a mini optimization in rx_compl_process() code (diff)
downloadlinux-7a1e9b2059d147461cff3dfbabbfb43f296a1eef.tar.xz
linux-7a1e9b2059d147461cff3dfbabbfb43f296a1eef.zip
be2net: don't rearm mcc cq when device is not open
When an MCC cmd is issued (via a netdev/ethtool op) while the device is not open, the MCC CQ gets processed but the EQ is not processed (as isr is not registered.) This can cause the EQ to become full. So, while the device is not open, CQ must not be re-armed to prevent EQ entries. Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_main.c')
-rw-r--r--drivers/net/benet/be_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 7bf1900df665..43dbe288a5ef 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1655,6 +1655,9 @@ static int be_open(struct net_device *netdev)
/* Rx compl queue may be in unarmed state; rearm it */
be_cq_notify(adapter, adapter->rx_obj.cq.id, true, 0);
+ /* Now that interrupts are on we can process async mcc */
+ be_async_mcc_enable(adapter);
+
status = be_cmd_link_status_query(adapter, &link_up, &mac_speed,
&link_speed);
if (status)
@@ -1780,6 +1783,8 @@ static int be_close(struct net_device *netdev)
cancel_delayed_work_sync(&adapter->work);
+ be_async_mcc_disable(adapter);
+
netif_stop_queue(netdev);
netif_carrier_off(netdev);
adapter->link_up = false;