From 3e61dcec5086a2d63f579d2cefa0f119e0fce19b Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Sun, 19 Nov 2006 14:08:56 -0800 Subject: [PATCH] --- yaml --- r: 41765 b: refs/heads/master c: a16dda0e67cea666fb7eb708ab1199892c4a1a13 h: refs/heads/master i: 41763: 45e074c6a80f81c55ca628b2a9a86cbdce3e25d0 v: v3 --- [refs] | 2 +- trunk/drivers/net/bnx2.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index aaa01da16b42..dfa0bbe100d6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f8dd064ee1bd62ef2cdb398cb9cdc8a8f112cb28 +refs/heads/master: a16dda0e67cea666fb7eb708ab1199892c4a1a13 diff --git a/trunk/drivers/net/bnx2.c b/trunk/drivers/net/bnx2.c index ea5daf6efa09..0a46b45f21dd 100644 --- a/trunk/drivers/net/bnx2.c +++ b/trunk/drivers/net/bnx2.c @@ -1159,7 +1159,6 @@ bnx2_setup_copper_phy(struct bnx2 *bp) } if (new_bmcr != bmcr) { u32 bmsr; - int i = 0; bnx2_read_phy(bp, MII_BMSR, &bmsr); bnx2_read_phy(bp, MII_BMSR, &bmsr); @@ -1167,12 +1166,12 @@ bnx2_setup_copper_phy(struct bnx2 *bp) if (bmsr & BMSR_LSTATUS) { /* Force link down */ bnx2_write_phy(bp, MII_BMCR, BMCR_LOOPBACK); - do { - udelay(100); - bnx2_read_phy(bp, MII_BMSR, &bmsr); - bnx2_read_phy(bp, MII_BMSR, &bmsr); - i++; - } while ((bmsr & BMSR_LSTATUS) && (i < 620)); + spin_unlock_bh(&bp->phy_lock); + msleep(50); + spin_lock_bh(&bp->phy_lock); + + bnx2_read_phy(bp, MII_BMSR, &bmsr); + bnx2_read_phy(bp, MII_BMSR, &bmsr); } bnx2_write_phy(bp, MII_BMCR, new_bmcr);