Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b1aefe58c21de4265223b563ae923b50f4c4be08
Commit:     b1aefe58c21de4265223b563ae923b50f4c4be08
Parent:     85bbe2158340dafb060fc7fe55a8208fe08cae26
Author:     Alex Bounine <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 11 14:36:12 2008 -0500
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Mon Feb 11 14:47:18 2008 -0500

    Tsi108_eth: fix link recovery after disconnect
    
    Bug fix for tsi108_eth network driver.
    This patch fixes a problem with link recovery after connection was lost.
    
    Signed-off-by: Alexandre Bounine <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/tsi108_eth.c |   26 ++++++++++++--------------
 1 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index 5a730ba..bc38489 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -338,22 +338,21 @@ static void tsi108_check_phy(struct net_device *dev)
 
                        TSI_WRITE(TSI108_MAC_CFG2, mac_cfg2_reg);
                        TSI_WRITE(TSI108_EC_PORTCTRL, portctrl_reg);
+               }
 
-                       if (data->link_up == 0) {
-                               /* The manual says it can take 3-4 usecs for 
the speed change
-                                * to take effect.
-                                */
-                               udelay(5);
+               if (data->link_up == 0) {
+                       /* The manual says it can take 3-4 usecs for the speed 
change
+                        * to take effect.
+                        */
+                       udelay(5);
 
-                               spin_lock(&data->txlock);
-                               if (is_valid_ether_addr(dev->dev_addr) && 
data->txfree)
-                                       netif_wake_queue(dev);
+                       spin_lock(&data->txlock);
+                       if (is_valid_ether_addr(dev->dev_addr) && data->txfree)
+                               netif_wake_queue(dev);
 
-                               data->link_up = 1;
-                               spin_unlock(&data->txlock);
-                       }
+                       data->link_up = 1;
+                       spin_unlock(&data->txlock);
                }
-
        } else {
                if (data->link_up == 1) {
                        netif_stop_queue(dev);
@@ -1267,12 +1266,11 @@ static void tsi108_init_phy(struct net_device *dev)
         * PHY_STAT register before the link up status bit is set.
         */
 
-       data->link_up = 1;
+       data->link_up = 0;
 
        while (!((phyval = tsi108_read_mii(data, MII_BMSR)) &
                 BMSR_LSTATUS)) {
                if (i++ > (MII_READ_DELAY / 10)) {
-                       data->link_up = 0;
                        break;
                }
                spin_unlock_irqrestore(&phy_lock, flags);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to