Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275693
b: refs/heads/master
c: 3ac3546
h: refs/heads/master
i:
  275691: d5938d9
v: v3
  • Loading branch information
Robert Marklund authored and David S. Miller committed Nov 14, 2011
1 parent 827f4b3 commit 69bd487
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef5e0d8237287db3a12d84f08fb2483d7a30a943
refs/heads/master: 3ac3546e5f17248d961ef0f4a27e75564bf71578
12 changes: 12 additions & 0 deletions trunk/drivers/net/ethernet/smsc/smsc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,7 @@ static int __devinit smsc911x_init(struct net_device *dev)
{
struct smsc911x_data *pdata = netdev_priv(dev);
unsigned int byte_test;
unsigned int to = 100;

SMSC_TRACE(pdata, probe, "Driver Parameters:");
SMSC_TRACE(pdata, probe, "LAN base: 0x%08lX",
Expand All @@ -1952,6 +1953,17 @@ static int __devinit smsc911x_init(struct net_device *dev)
return -ENODEV;
}

/*
* poll the READY bit in PMT_CTRL. Any other access to the device is
* forbidden while this bit isn't set. Try for 100ms
*/
while (!(smsc911x_reg_read(pdata, PMT_CTRL) & PMT_CTRL_READY_) && --to)
udelay(1000);
if (to == 0) {
pr_err("Device not READY in 100ms aborting\n");
return -ENODEV;
}

/* Check byte ordering */
byte_test = smsc911x_reg_read(pdata, BYTE_TEST);
SMSC_TRACE(pdata, probe, "BYTE_TEST: 0x%08X", byte_test);
Expand Down

0 comments on commit 69bd487

Please sign in to comment.