aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bnx2.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index ea5daf6efa09..0a46b45f21dd 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -1159,7 +1159,6 @@ bnx2_setup_copper_phy(struct bnx2 *bp)
1159 } 1159 }
1160 if (new_bmcr != bmcr) { 1160 if (new_bmcr != bmcr) {
1161 u32 bmsr; 1161 u32 bmsr;
1162 int i = 0;
1163 1162
1164 bnx2_read_phy(bp, MII_BMSR, &bmsr); 1163 bnx2_read_phy(bp, MII_BMSR, &bmsr);
1165 bnx2_read_phy(bp, MII_BMSR, &bmsr); 1164 bnx2_read_phy(bp, MII_BMSR, &bmsr);
@@ -1167,12 +1166,12 @@ bnx2_setup_copper_phy(struct bnx2 *bp)
1167 if (bmsr & BMSR_LSTATUS) { 1166 if (bmsr & BMSR_LSTATUS) {
1168 /* Force link down */ 1167 /* Force link down */
1169 bnx2_write_phy(bp, MII_BMCR, BMCR_LOOPBACK); 1168 bnx2_write_phy(bp, MII_BMCR, BMCR_LOOPBACK);
1170 do { 1169 spin_unlock_bh(&bp->phy_lock);
1171 udelay(100); 1170 msleep(50);
1172 bnx2_read_phy(bp, MII_BMSR, &bmsr); 1171 spin_lock_bh(&bp->phy_lock);
1173 bnx2_read_phy(bp, MII_BMSR, &bmsr); 1172
1174 i++; 1173 bnx2_read_phy(bp, MII_BMSR, &bmsr);
1175 } while ((bmsr & BMSR_LSTATUS) && (i < 620)); 1174 bnx2_read_phy(bp, MII_BMSR, &bmsr);
1176 } 1175 }
1177 1176
1178 bnx2_write_phy(bp, MII_BMCR, new_bmcr); 1177 bnx2_write_phy(bp, MII_BMCR, new_bmcr);