staging: et131x: Bugfix - driver doesn't autoreneg after cable unplug/plug events
authorMark Einon <mark.einon@gmail.com>
Sun, 25 Sep 2011 18:17:57 +0000 (19:17 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 27 Sep 2011 00:39:17 +0000 (17:39 -0700)
This driver has a long standing bug where removing and inserting the ethernet cable results in no packets being
trnasmitted / received and hence no autonegotiation occurring.

Fixed by resetting the rx/tx engines and queue on detecting a cable being removed.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/et131x/et131x_initpci.c

index 618f84428a0e7940b18e03314d87343ed81594c1..e9daa733bea2ea732e1c3f83e1526233a184fb48 100644 (file)
@@ -544,6 +544,10 @@ static void et131x_adjust_link(struct net_device *netdev)
 
                        /* Setup ET1310 as per the documentation */
                        et131x_adapter_setup(adapter);
+
+                       /* perform reset of tx/rx */
+                       et131x_disable_txrx(netdev);
+                       et131x_enable_txrx(netdev);
                }
 
                adapter->link = phydev->link;