]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sky2: fix for NAPI with dual port boards
authorStephen Hemminger <shemminger@linux-foundation.org>
Tue, 27 Feb 2007 01:18:35 +0000 (17:18 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 3 Mar 2007 00:32:46 +0000 (16:32 -0800)
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: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/sky2.c

index 6e494635eb21a9d1583c7ad11d96799959d979b4..79fded454ee4371b4539f58eb4f0044dfe104129 100644 (file)
@@ -1499,6 +1499,13 @@ static int sky2_down(struct net_device *dev)
        imask &= ~portirq_msk[port];
        sky2_write32(hw, B0_IMSK, imask);
 
+       /*
+        * 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);
+
        sky2_gmac_reset(hw, port);
 
        /* Stop transmitter */