From: Stephen Hemminger Date: Tue, 27 Feb 2007 01:18:35 +0000 (-0800) Subject: sky2: fix for NAPI with dual port boards X-Git-Tag: v2.6.19.6~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe864ebed2a1e894552bb426bbb02a2e2c2f6878;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 6e494635eb21a..79fded454ee43 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 */