]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
atl1: fix transmit timeout bug
authorJay Cliburn <jacliburn@bellsouth.net>
Sat, 27 Sep 2008 04:17:20 +0000 (04:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Oct 2008 23:06:47 +0000 (16:06 -0700)
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>
drivers/net/atlx/atl1.c
drivers/net/atlx/atlx.c

index e23ce77712f17a79187ce0c8f9f127ae53c3dec6..e00a9867390a1e2b38683685a2a8c843ae1d4ab1 100644 (file)
@@ -2642,6 +2642,7 @@ static void atl1_down(struct atl1_adapter *adapter)
 {
        struct net_device *netdev = adapter->netdev;
 
+       netif_stop_queue(netdev);
        del_timer_sync(&adapter->watchdog_timer);
        del_timer_sync(&adapter->phy_config_timer);
        adapter->phy_timer_pending = false;
@@ -2655,7 +2656,6 @@ static void atl1_down(struct atl1_adapter *adapter)
        adapter->link_speed = SPEED_0;
        adapter->link_duplex = -1;
        netif_carrier_off(netdev);
-       netif_stop_queue(netdev);
 
        atl1_clean_tx_ring(adapter);
        atl1_clean_rx_ring(adapter);
@@ -2724,6 +2724,8 @@ static int atl1_open(struct net_device *netdev)
        struct atl1_adapter *adapter = netdev_priv(netdev);
        int err;
 
+       netif_carrier_off(netdev);
+
        /* allocate transmit descriptors */
        err = atl1_setup_ring_resources(adapter);
        if (err)
index b3e7fcf0f6e7be18b6ea4901d1f62050e2e3c19e..3cc9d1089ca15b2c40ec80a88c124fe391116451 100644 (file)
@@ -105,7 +105,6 @@ static void atlx_check_for_link(struct atlx_adapter *adapter)
                                netdev->name);
                        adapter->link_speed = SPEED_0;
                        netif_carrier_off(netdev);
-                       netif_stop_queue(netdev);
                }
        }
        schedule_work(&adapter->link_chg_task);