aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlkka Virta <itvirta@iki.fi>2009-02-06 22:00:36 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-02-17 09:28:56 -0800
commit8527040ae52a767037fe3faec6aeeed474b48104 (patch)
tree87e497294d6f0e5e2988c87a5b6709d650cd501b
parentb5934d35aceba7534aca1e37000753d74919d867 (diff)
sungem: Soft lockup in sungem on Netra AC200 when switching interface up
[ Upstream commit 71822faa3bc0af5dbf5e333a2d085f1ed7cd809f ] From: Ilkka Virta <itvirta@iki.fi> In the lockup situation the driver seems to go off in an eternal storm of interrupts right after calling request_irq(). It doesn't actually do anything interesting in the interrupt handler. Since connecting the link afterwards works, something later in initialization must fix this. Looking at gem_do_start() and gem_open(), it seems that the only thing done while opening the device after the request_irq(), is a call to napi_enable(). I don't know what the ordering requirements are for the initialization, but I boldly tried to move the napi_enable() call inside gem_do_start() before the link state is checked and interrupts subsequently enabled, and it seems to work for me. Doesn't even break anything too obvious... Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/net/sungem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index fed7eba65ea..cb9e3f535c5 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -2222,6 +2222,8 @@ static int gem_do_start(struct net_device *dev)
gp->running = 1;
+ napi_enable(&gp->napi);
+
if (gp->lstate == link_up) {
netif_carrier_on(gp->dev);
gem_set_link_modes(gp);
@@ -2239,6 +2241,8 @@ static int gem_do_start(struct net_device *dev)
spin_lock_irqsave(&gp->lock, flags);
spin_lock(&gp->tx_lock);
+ napi_disable(&gp->napi);
+
gp->running = 0;
gem_reset(gp);
gem_clean_rings(gp);
@@ -2339,8 +2343,6 @@ static int gem_open(struct net_device *dev)
if (!gp->asleep)
rc = gem_do_start(dev);
gp->opened = (rc == 0);
- if (gp->opened)
- napi_enable(&gp->napi);
mutex_unlock(&gp->pm_mutex);
@@ -2477,8 +2479,6 @@ static int gem_resume(struct pci_dev *pdev)
/* Re-attach net device */
netif_device_attach(dev);
-
- napi_enable(&gp->napi);
}
spin_lock_irqsave(&gp->lock, flags);