[PATCH] sky2: revert IRQ dance on suspend/resume
[powerpc.git] / drivers / net / sky2.c
index fb1d2c3..822dd0b 100644 (file)
@@ -569,8 +569,8 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff)
        if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
                onoff = !onoff;
 
+       sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
        reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
-
        if (onoff)
                /* Turn off phy power saving */
                reg1 &= ~phy_power[port];
@@ -579,6 +579,7 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff)
 
        sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
        sky2_pci_read32(hw, PCI_DEV_REG1);
+       sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
        udelay(100);
 }
 
@@ -1511,6 +1512,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 */
@@ -3658,6 +3666,6 @@ module_init(sky2_init_module);
 module_exit(sky2_cleanup_module);
 
 MODULE_DESCRIPTION("Marvell Yukon 2 Gigabit Ethernet driver");
-MODULE_AUTHOR("Stephen Hemminger <shemminger@osdl.org>");
+MODULE_AUTHOR("Stephen Hemminger <shemminger@linux-foundation.org>");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_VERSION);