[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111107081316.2e1cc2cb@nehalam.linuxnetplumber.net>
Date: Mon, 7 Nov 2011 08:13:16 -0800
From: Stephen Hemminger <shemminger@...tta.com>
To: Dominik Brodowski <linux@...inikbrodowski.net>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: commit 0bdb0bd0 breaks shutdown/reboot
Does this help?
Subject: sky2: block irq's on down
Need to block IRQ's from phy changes to prevent stray IRQ's when
device is down.
Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
--- a/drivers/net/ethernet/marvell/sky2.c 2011-11-04 15:01:51.310888300 -0700
+++ b/drivers/net/ethernet/marvell/sky2.c 2011-11-07 08:10:05.065118917 -0800
@@ -2106,15 +2106,20 @@ static int sky2_down(struct net_device *
netif_info(sky2, ifdown, dev, "disabling interface\n");
- /* Disable port IRQ */
- sky2_write32(hw, B0_IMSK,
- sky2_read32(hw, B0_IMSK) & ~portirq_msk[sky2->port]);
- sky2_read32(hw, B0_IMSK);
-
if (hw->ports == 1) {
+ sky2_write32(hw, B0_IMSK, 0);
+ sky2_read32(hw, B0_IMSK);
+
napi_disable(&hw->napi);
free_irq(hw->pdev->irq, hw);
} else {
+ /* Disable port IRQ */
+ u32 imsk = sky2_read32(hw, B0_IMSK);
+
+ imsk &= ~portirq_msk[sky2->port];
+ sky2_write32(hw, B0_IMSK, imsk);
+ sky2_read32(hw, B0_IMSK);
+
synchronize_irq(hw->pdev->irq);
napi_synchronize(&hw->napi);
}
@@ -5017,19 +5022,19 @@ static void __devexit sky2_remove(struct
for (i = hw->ports-1; i >= 0; --i)
unregister_netdev(hw->dev[i]);
- sky2_write32(hw, B0_IMSK, 0);
- sky2_read32(hw, B0_IMSK);
-
sky2_power_aux(hw);
- sky2_write8(hw, B0_CTST, CS_RST_SET);
- sky2_read8(hw, B0_CTST);
-
if (hw->ports > 1) {
+ sky2_write32(hw, B0_IMSK, 0);
+ sky2_read32(hw, B0_IMSK);
+
napi_disable(&hw->napi);
free_irq(pdev->irq, hw);
}
+ sky2_write8(hw, B0_CTST, CS_RST_SET);
+ sky2_read8(hw, B0_CTST);
+
if (hw->flags & SKY2_HW_USE_MSI)
pci_disable_msi(pdev);
pci_free_consistent(pdev, hw->st_size * sizeof(struct sky2_status_le),
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists