Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41765
b: refs/heads/master
c: a16dda0
h: refs/heads/master
i:
  41763: 45e074c
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Dec 3, 2006
1 parent fd3a5d2 commit 3e61dce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f8dd064ee1bd62ef2cdb398cb9cdc8a8f112cb28
refs/heads/master: a16dda0e67cea666fb7eb708ab1199892c4a1a13
13 changes: 6 additions & 7 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1159,20 +1159,19 @@ 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);

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);
Expand Down

0 comments on commit 3e61dce

Please sign in to comment.