aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2009-04-21 14:42:05 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-22 03:47:54 -0400
commit4cb9be7ab47820a1fa747569f5f035a5f628c91b (patch)
treef272447c9bdc5b01578760f1c0f973a183f801b5 /drivers/net
parentbf98a82633b97fb638fcee0fae3c0de54d1f7b05 (diff)
e1000/e1000e/igb/ixgb: do not use netif_wake_queue un-necessarily
It was pointed out that the Intel wired ethernet drivers do not need to wake the tx queue since netif_carrier_on/off will take care of the qdisc management in order to guarantee the correct handling of the transmit routine enable state. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/e1000/e1000_main.c4
-rw-r--r--drivers/net/e1000e/netdev.c8
-rw-r--r--drivers/net/igb/igb_main.c4
-rw-r--r--drivers/net/ixgb/ixgb_main.c5
4 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 112e6b039983..71d4fe15976a 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -498,6 +498,8 @@ int e1000_up(struct e1000_adapter *adapter)
498 498
499 e1000_irq_enable(adapter); 499 e1000_irq_enable(adapter);
500 500
501 netif_wake_queue(adapter->netdev);
502
501 /* fire a link change interrupt to start the watchdog */ 503 /* fire a link change interrupt to start the watchdog */
502 ew32(ICS, E1000_ICS_LSC); 504 ew32(ICS, E1000_ICS_LSC);
503 return 0; 505 return 0;
@@ -2591,7 +2593,6 @@ static void e1000_watchdog(unsigned long data)
2591 ew32(TCTL, tctl); 2593 ew32(TCTL, tctl);
2592 2594
2593 netif_carrier_on(netdev); 2595 netif_carrier_on(netdev);
2594 netif_wake_queue(netdev);
2595 mod_timer(&adapter->phy_info_timer, round_jiffies(jiffies + 2 * HZ)); 2596 mod_timer(&adapter->phy_info_timer, round_jiffies(jiffies + 2 * HZ));
2596 adapter->smartspeed = 0; 2597 adapter->smartspeed = 0;
2597 } else { 2598 } else {
@@ -2608,7 +2609,6 @@ static void e1000_watchdog(unsigned long data)
2608 printk(KERN_INFO "e1000: %s NIC Link is Down\n", 2609 printk(KERN_INFO "e1000: %s NIC Link is Down\n",
2609 netdev->name); 2610 netdev->name);
2610 netif_carrier_off(netdev); 2611 netif_carrier_off(netdev);
2611 netif_stop_queue(netdev);
2612 mod_timer(&adapter->phy_info_timer, round_jiffies(jiffies + 2 * HZ)); 2612 mod_timer(&adapter->phy_info_timer, round_jiffies(jiffies + 2 * HZ));
2613 2613
2614 /* 80003ES2LAN workaround-- 2614 /* 80003ES2LAN workaround--
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 9048f8e6a8ce..da6b37e05bea 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2826,6 +2826,8 @@ int e1000e_up(struct e1000_adapter *adapter)
2826 e1000_configure_msix(adapter); 2826 e1000_configure_msix(adapter);
2827 e1000_irq_enable(adapter); 2827 e1000_irq_enable(adapter);
2828 2828
2829 netif_wake_queue(adapter->netdev);
2830
2829 /* fire a link change interrupt to start the watchdog */ 2831 /* fire a link change interrupt to start the watchdog */
2830 ew32(ICS, E1000_ICS_LSC); 2832 ew32(ICS, E1000_ICS_LSC);
2831 return 0; 2833 return 0;
@@ -2848,7 +2850,7 @@ void e1000e_down(struct e1000_adapter *adapter)
2848 ew32(RCTL, rctl & ~E1000_RCTL_EN); 2850 ew32(RCTL, rctl & ~E1000_RCTL_EN);
2849 /* flush and sleep below */ 2851 /* flush and sleep below */
2850 2852
2851 netif_tx_stop_all_queues(netdev); 2853 netif_stop_queue(netdev);
2852 2854
2853 /* disable transmits in the hardware */ 2855 /* disable transmits in the hardware */
2854 tctl = er32(TCTL); 2856 tctl = er32(TCTL);
@@ -3130,7 +3132,7 @@ static int e1000_open(struct net_device *netdev)
3130 3132
3131 e1000_irq_enable(adapter); 3133 e1000_irq_enable(adapter);
3132 3134
3133 netif_tx_start_all_queues(netdev); 3135 netif_start_queue(netdev);
3134 3136
3135 /* fire a link status change interrupt to start the watchdog */ 3137 /* fire a link status change interrupt to start the watchdog */
3136 ew32(ICS, E1000_ICS_LSC); 3138 ew32(ICS, E1000_ICS_LSC);
@@ -3600,7 +3602,6 @@ static void e1000_watchdog_task(struct work_struct *work)
3600 phy->ops.cfg_on_link_up(hw); 3602 phy->ops.cfg_on_link_up(hw);
3601 3603
3602 netif_carrier_on(netdev); 3604 netif_carrier_on(netdev);
3603 netif_tx_wake_all_queues(netdev);
3604 3605
3605 if (!test_bit(__E1000_DOWN, &adapter->state)) 3606 if (!test_bit(__E1000_DOWN, &adapter->state))
3606 mod_timer(&adapter->phy_info_timer, 3607 mod_timer(&adapter->phy_info_timer,
@@ -3614,7 +3615,6 @@ static void e1000_watchdog_task(struct work_struct *work)
3614 printk(KERN_INFO "e1000e: %s NIC Link is Down\n", 3615 printk(KERN_INFO "e1000e: %s NIC Link is Down\n",
3615 adapter->netdev->name); 3616 adapter->netdev->name);
3616 netif_carrier_off(netdev); 3617 netif_carrier_off(netdev);
3617 netif_tx_stop_all_queues(netdev);
3618 if (!test_bit(__E1000_DOWN, &adapter->state)) 3618 if (!test_bit(__E1000_DOWN, &adapter->state))
3619 mod_timer(&adapter->phy_info_timer, 3619 mod_timer(&adapter->phy_info_timer,
3620 round_jiffies(jiffies + 2 * HZ)); 3620 round_jiffies(jiffies + 2 * HZ));
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index ceaa58554679..183235d46aee 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -942,6 +942,8 @@ int igb_up(struct igb_adapter *adapter)
942 rd32(E1000_ICR); 942 rd32(E1000_ICR);
943 igb_irq_enable(adapter); 943 igb_irq_enable(adapter);
944 944
945 netif_tx_start_all_queues(adapter->netdev);
946
945 /* Fire a link change interrupt to start the watchdog. */ 947 /* Fire a link change interrupt to start the watchdog. */
946 wr32(E1000_ICS, E1000_ICS_LSC); 948 wr32(E1000_ICS, E1000_ICS_LSC);
947 return 0; 949 return 0;
@@ -2664,7 +2666,6 @@ static void igb_watchdog_task(struct work_struct *work)
2664 } 2666 }
2665 2667
2666 netif_carrier_on(netdev); 2668 netif_carrier_on(netdev);
2667 netif_tx_wake_all_queues(netdev);
2668 2669
2669 igb_ping_all_vfs(adapter); 2670 igb_ping_all_vfs(adapter);
2670 2671
@@ -2681,7 +2682,6 @@ static void igb_watchdog_task(struct work_struct *work)
2681 printk(KERN_INFO "igb: %s NIC Link is Down\n", 2682 printk(KERN_INFO "igb: %s NIC Link is Down\n",
2682 netdev->name); 2683 netdev->name);
2683 netif_carrier_off(netdev); 2684 netif_carrier_off(netdev);
2684 netif_tx_stop_all_queues(netdev);
2685 2685
2686 igb_ping_all_vfs(adapter); 2686 igb_ping_all_vfs(adapter);
2687 2687
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index ff741ca110f5..cb9ecc48f6d0 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -266,6 +266,8 @@ ixgb_up(struct ixgb_adapter *adapter)
266 napi_enable(&adapter->napi); 266 napi_enable(&adapter->napi);
267 ixgb_irq_enable(adapter); 267 ixgb_irq_enable(adapter);
268 268
269 netif_wake_queue(netdev);
270
269 mod_timer(&adapter->watchdog_timer, jiffies); 271 mod_timer(&adapter->watchdog_timer, jiffies);
270 272
271 return 0; 273 return 0;
@@ -1118,7 +1120,6 @@ ixgb_watchdog(unsigned long data)
1118 adapter->link_speed = 10000; 1120 adapter->link_speed = 10000;
1119 adapter->link_duplex = FULL_DUPLEX; 1121 adapter->link_duplex = FULL_DUPLEX;
1120 netif_carrier_on(netdev); 1122 netif_carrier_on(netdev);
1121 netif_wake_queue(netdev);
1122 } 1123 }
1123 } else { 1124 } else {
1124 if (netif_carrier_ok(netdev)) { 1125 if (netif_carrier_ok(netdev)) {
@@ -1127,8 +1128,6 @@ ixgb_watchdog(unsigned long data)
1127 printk(KERN_INFO "ixgb: %s NIC Link is Down\n", 1128 printk(KERN_INFO "ixgb: %s NIC Link is Down\n",
1128 netdev->name); 1129 netdev->name);
1129 netif_carrier_off(netdev); 1130 netif_carrier_off(netdev);
1130 netif_stop_queue(netdev);
1131
1132 } 1131 }
1133 } 1132 }
1134 1133