diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-02-26 17:18:35 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-03-02 16:32:46 -0800 |
commit | fe864ebed2a1e894552bb426bbb02a2e2c2f6878 (patch) | |
tree | 128938e7e97ae84ff236e753897f289940406ed3 | |
parent | 6c51946a6ee266a8861cecc8277f5b7009851738 (diff) | |
download | lwn-fe864ebed2a1e894552bb426bbb02a2e2c2f6878.tar.gz lwn-fe864ebed2a1e894552bb426bbb02a2e2c2f6878.zip |
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: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/net/sky2.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 6e494635eb21..79fded454ee4 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -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 */ |