[BNX2]: Remove udelay() in copper PHY code.

Change a long udelay() in bnx2_setup_copper_phy() to msleep().

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Michael Chan 2006-11-19 14:08:56 -08:00 committed by David S. Miller
parent f8dd064ee1
commit a16dda0e67

View File

@ -1159,7 +1159,6 @@ bnx2_setup_copper_phy(struct bnx2 *bp)
} }
if (new_bmcr != bmcr) { if (new_bmcr != bmcr) {
u32 bmsr; u32 bmsr;
int i = 0;
bnx2_read_phy(bp, MII_BMSR, &bmsr); bnx2_read_phy(bp, MII_BMSR, &bmsr);
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) { if (bmsr & BMSR_LSTATUS) {
/* Force link down */ /* Force link down */
bnx2_write_phy(bp, MII_BMCR, BMCR_LOOPBACK); bnx2_write_phy(bp, MII_BMCR, BMCR_LOOPBACK);
do { spin_unlock_bh(&bp->phy_lock);
udelay(100); msleep(50);
spin_lock_bh(&bp->phy_lock);
bnx2_read_phy(bp, MII_BMSR, &bmsr); bnx2_read_phy(bp, MII_BMSR, &bmsr);
bnx2_read_phy(bp, MII_BMSR, &bmsr); bnx2_read_phy(bp, MII_BMSR, &bmsr);
i++;
} while ((bmsr & BMSR_LSTATUS) && (i < 620));
} }
bnx2_write_phy(bp, MII_BMCR, new_bmcr); bnx2_write_phy(bp, MII_BMCR, new_bmcr);