Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275709
b: refs/heads/master
c: a77929a
h: refs/heads/master
i:
  275707: e3370c1
v: v3
  • Loading branch information
Grant Grundler authored and David S. Miller committed Nov 15, 2011
1 parent 0a25515 commit be85487
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: 3486140e30fcc16c0b8cd9545fbe5e2e66bf6941
refs/heads/master: a77929a278651d4451c872178d4d7aac8908aa8e
12 changes: 10 additions & 2 deletions trunk/drivers/net/usb/asix.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,17 @@ static u32 asix_get_phyid(struct usbnet *dev)
{
int phy_reg;
u32 phy_id;
int i;

phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1);
if (phy_reg < 0)
/* Poll for the rare case the FW or phy isn't ready yet. */
for (i = 0; i < 100; i++) {
phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1);
if (phy_reg != 0 && phy_reg != 0xFFFF)
break;
mdelay(1);
}

if (phy_reg <= 0 || phy_reg == 0xFFFF)
return 0;

phy_id = (phy_reg & 0xffff) << 16;
Expand Down

0 comments on commit be85487

Please sign in to comment.