The suspend and shutdown code plays with shared state. Use consistent
locking, for extra protection.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
del_timer_sync(&hw->watchdog_timer);
cancel_work_sync(&hw->restart_work);
del_timer_sync(&hw->watchdog_timer);
cancel_work_sync(&hw->restart_work);
for (i = 0; i < hw->ports; i++) {
struct net_device *dev = hw->dev[i];
struct sky2_port *sky2 = netdev_priv(dev);
for (i = 0; i < hw->ports; i++) {
struct net_device *dev = hw->dev[i];
struct sky2_port *sky2 = netdev_priv(dev);
sky2_write32(hw, B0_IMSK, 0);
napi_disable(&hw->napi);
sky2_power_aux(hw);
sky2_write32(hw, B0_IMSK, 0);
napi_disable(&hw->napi);
sky2_power_aux(hw);
pci_save_state(pdev);
pci_enable_wake(pdev, pci_choose_state(pdev, state), wol);
pci_save_state(pdev);
pci_enable_wake(pdev, pci_choose_state(pdev, state), wol);
del_timer_sync(&hw->watchdog_timer);
for (i = 0; i < hw->ports; i++) {
del_timer_sync(&hw->watchdog_timer);
for (i = 0; i < hw->ports; i++) {
if (wol)
sky2_power_aux(hw);
if (wol)
sky2_power_aux(hw);
pci_enable_wake(pdev, PCI_D3hot, wol);
pci_enable_wake(pdev, PCI_D3cold, wol);
pci_enable_wake(pdev, PCI_D3hot, wol);
pci_enable_wake(pdev, PCI_D3cold, wol);