aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/e1000/e1000.h1
-rw-r--r--drivers/net/e1000/e1000_main.c15
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 0a084e915dd6..d95a5f88181c 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -296,6 +296,7 @@ struct e1000_adapter {
296 uint32_t tx_fifo_head; 296 uint32_t tx_fifo_head;
297 uint32_t tx_head_addr; 297 uint32_t tx_head_addr;
298 uint32_t tx_fifo_size; 298 uint32_t tx_fifo_size;
299 uint8_t tx_timeout_factor;
299 atomic_t tx_fifo_stall; 300 atomic_t tx_fifo_stall;
300 boolean_t pcix_82544; 301 boolean_t pcix_82544;
301 boolean_t detect_tx_hung; 302 boolean_t detect_tx_hung;
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index cefc7cc092a7..cf4fc5117032 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2319,6 +2319,21 @@ e1000_watchdog_task(struct e1000_adapter *adapter)
2319 adapter->link_duplex == FULL_DUPLEX ? 2319 adapter->link_duplex == FULL_DUPLEX ?
2320 "Full Duplex" : "Half Duplex"); 2320 "Full Duplex" : "Half Duplex");
2321 2321
2322 /* tweak tx_queue_len according to speed/duplex */
2323 netdev->tx_queue_len = adapter->tx_queue_len;
2324 adapter->tx_timeout_factor = 1;
2325 if (adapter->link_duplex == HALF_DUPLEX) {
2326 switch (adapter->link_speed) {
2327 case SPEED_10:
2328 netdev->tx_queue_len = 10;
2329 adapter->tx_timeout_factor = 8;
2330 break;
2331 case SPEED_100:
2332 netdev->tx_queue_len = 100;
2333 break;
2334 }
2335 }
2336
2322 netif_carrier_on(netdev); 2337 netif_carrier_on(netdev);
2323 netif_wake_queue(netdev); 2338 netif_wake_queue(netdev);
2324 mod_timer(&adapter->phy_info_timer, jiffies + 2 * HZ); 2339 mod_timer(&adapter->phy_info_timer, jiffies + 2 * HZ);