aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-02-22 21:07:11 +0100
committerAdrian Bunk <bunk@stusta.de>2007-02-22 21:07:11 +0100
commit189b9a3bc90ecb79eb82ed4450db177aed7d292d (patch)
treeb863ea118ebe00681a682280911d48be34a55696
parent65c35f6af648308f2a2d31b2dccacc7b3aeb640f (diff)
sky2: fix for NAPI with dual port boards
This driver uses port 0 to handle receives on both ports. So the netif_poll_disable call in dev_close would end up stopping the second port on dual port cards. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Adrian Bunk <bunk@stusta.de>
-rw-r--r--drivers/net/sky2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index d77358649af..171443f9fc7 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1402,6 +1402,13 @@ static int sky2_down(struct net_device *dev)
/* Stop more packets from being queued */
netif_stop_queue(dev);
+ /*
+ * Both ports share the NAPI poll on port 0, so if necessary undo the
+ * the disable that is done in dev_close.
+ */
+ if (sky2->port == 0 && hw->ports > 1)
+ netif_poll_enable(dev);
+
/* Disable port IRQ */
spin_lock_irq(&hw->hw_lock);
hw->intr_mask &= ~((sky2->port == 0) ? Y2_IS_IRQ_PHY1 : Y2_IS_IRQ_PHY2);