Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166546
b: refs/heads/master
c: baa3474
h: refs/heads/master
v: v3
  • Loading branch information
Jesse Brandeburg authored and David S. Miller committed Sep 27, 2009
1 parent 70fa035 commit 12ba937
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 51851073093f36a626de5f5eb1b87db9cae7e0d2
refs/heads/master: baa34745fe6263c733f43feddb0b8100d6538f37
26 changes: 19 additions & 7 deletions trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,11 @@ static void __devexit e1000_remove(struct pci_dev *pdev)
struct e1000_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw;

set_bit(__E1000_DOWN, &adapter->flags);
del_timer_sync(&adapter->tx_fifo_stall_timer);
del_timer_sync(&adapter->watchdog_timer);
del_timer_sync(&adapter->phy_info_timer);

cancel_work_sync(&adapter->reset_task);

e1000_release_manageability(adapter);
Expand Down Expand Up @@ -2240,7 +2245,7 @@ static void e1000_82547_tx_fifo_stall(unsigned long data)
adapter->tx_fifo_head = 0;
atomic_set(&adapter->tx_fifo_stall, 0);
netif_wake_queue(netdev);
} else {
} else if (!test_bit(__E1000_DOWN, &adapter->flags)) {
mod_timer(&adapter->tx_fifo_stall_timer, jiffies + 1);
}
}
Expand Down Expand Up @@ -2309,8 +2314,9 @@ static void e1000_watchdog(unsigned long data)
ew32(TCTL, tctl);

netif_carrier_on(netdev);
mod_timer(&adapter->phy_info_timer,
round_jiffies(jiffies + 2 * HZ));
if (!test_bit(__E1000_DOWN, &adapter->flags))
mod_timer(&adapter->phy_info_timer,
round_jiffies(jiffies + 2 * HZ));
adapter->smartspeed = 0;
}
} else {
Expand All @@ -2320,8 +2326,10 @@ static void e1000_watchdog(unsigned long data)
printk(KERN_INFO "e1000: %s NIC Link is Down\n",
netdev->name);
netif_carrier_off(netdev);
mod_timer(&adapter->phy_info_timer,
round_jiffies(jiffies + 2 * HZ));

if (!test_bit(__E1000_DOWN, &adapter->flags))
mod_timer(&adapter->phy_info_timer,
round_jiffies(jiffies + 2 * HZ));
}

e1000_smartspeed(adapter);
Expand Down Expand Up @@ -2361,7 +2369,9 @@ static void e1000_watchdog(unsigned long data)
adapter->detect_tx_hung = true;

/* Reset the timer */
mod_timer(&adapter->watchdog_timer, round_jiffies(jiffies + 2 * HZ));
if (!test_bit(__E1000_DOWN, &adapter->flags))
mod_timer(&adapter->watchdog_timer,
round_jiffies(jiffies + 2 * HZ));
}

enum latency_range {
Expand Down Expand Up @@ -2977,7 +2987,9 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
if (unlikely(hw->mac_type == e1000_82547)) {
if (unlikely(e1000_82547_fifo_workaround(adapter, skb))) {
netif_stop_queue(netdev);
mod_timer(&adapter->tx_fifo_stall_timer, jiffies + 1);
if (!test_bit(__E1000_DOWN, &adapter->flags))
mod_timer(&adapter->tx_fifo_stall_timer,
jiffies + 1);
return NETDEV_TX_BUSY;
}
}
Expand Down

0 comments on commit 12ba937

Please sign in to comment.