diff options
author | Jay Cliburn <jacliburn@bellsouth.net> | 2008-09-27 00:17:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 19:06:47 -0400 |
commit | b29be6d3f215ac42651545e89afecc7d9e6a10db (patch) | |
tree | 7644a6f4395e9d6044ed0275419a157b4d128f35 | |
parent | e824b3eb4acad16c64c9ddf8e63b63e2469259b0 (diff) |
atl1: fix transmit timeout bug
See http://marc.info/?l=linux-netdev&m=121931988219314&w=2
Stop the queue and turn off carrier to prevent transmit timeouts
when the cable is unplugged/replugged.
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/atlx/atl1.c | 4 | ||||
-rw-r--r-- | drivers/net/atlx/atlx.c | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index e23ce77712f1..e00a9867390a 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c | |||
@@ -2642,6 +2642,7 @@ static void atl1_down(struct atl1_adapter *adapter) | |||
2642 | { | 2642 | { |
2643 | struct net_device *netdev = adapter->netdev; | 2643 | struct net_device *netdev = adapter->netdev; |
2644 | 2644 | ||
2645 | netif_stop_queue(netdev); | ||
2645 | del_timer_sync(&adapter->watchdog_timer); | 2646 | del_timer_sync(&adapter->watchdog_timer); |
2646 | del_timer_sync(&adapter->phy_config_timer); | 2647 | del_timer_sync(&adapter->phy_config_timer); |
2647 | adapter->phy_timer_pending = false; | 2648 | adapter->phy_timer_pending = false; |
@@ -2655,7 +2656,6 @@ static void atl1_down(struct atl1_adapter *adapter) | |||
2655 | adapter->link_speed = SPEED_0; | 2656 | adapter->link_speed = SPEED_0; |
2656 | adapter->link_duplex = -1; | 2657 | adapter->link_duplex = -1; |
2657 | netif_carrier_off(netdev); | 2658 | netif_carrier_off(netdev); |
2658 | netif_stop_queue(netdev); | ||
2659 | 2659 | ||
2660 | atl1_clean_tx_ring(adapter); | 2660 | atl1_clean_tx_ring(adapter); |
2661 | atl1_clean_rx_ring(adapter); | 2661 | atl1_clean_rx_ring(adapter); |
@@ -2724,6 +2724,8 @@ static int atl1_open(struct net_device *netdev) | |||
2724 | struct atl1_adapter *adapter = netdev_priv(netdev); | 2724 | struct atl1_adapter *adapter = netdev_priv(netdev); |
2725 | int err; | 2725 | int err; |
2726 | 2726 | ||
2727 | netif_carrier_off(netdev); | ||
2728 | |||
2727 | /* allocate transmit descriptors */ | 2729 | /* allocate transmit descriptors */ |
2728 | err = atl1_setup_ring_resources(adapter); | 2730 | err = atl1_setup_ring_resources(adapter); |
2729 | if (err) | 2731 | if (err) |
diff --git a/drivers/net/atlx/atlx.c b/drivers/net/atlx/atlx.c index b3e7fcf0f6e7..3cc9d1089ca1 100644 --- a/drivers/net/atlx/atlx.c +++ b/drivers/net/atlx/atlx.c | |||
@@ -105,7 +105,6 @@ static void atlx_check_for_link(struct atlx_adapter *adapter) | |||
105 | netdev->name); | 105 | netdev->name); |
106 | adapter->link_speed = SPEED_0; | 106 | adapter->link_speed = SPEED_0; |
107 | netif_carrier_off(netdev); | 107 | netif_carrier_off(netdev); |
108 | netif_stop_queue(netdev); | ||
109 | } | 108 | } |
110 | } | 109 | } |
111 | schedule_work(&adapter->link_chg_task); | 110 | schedule_work(&adapter->link_chg_task); |