diff options
Diffstat (limited to 'drivers/net/ethernet/smsc/smsc911x.c')
-rw-r--r-- | drivers/net/ethernet/smsc/smsc911x.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index d2be42aafbef..8843071fe987 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c | |||
@@ -1937,6 +1937,7 @@ static int __devinit smsc911x_init(struct net_device *dev) | |||
1937 | { | 1937 | { |
1938 | struct smsc911x_data *pdata = netdev_priv(dev); | 1938 | struct smsc911x_data *pdata = netdev_priv(dev); |
1939 | unsigned int byte_test; | 1939 | unsigned int byte_test; |
1940 | unsigned int to = 100; | ||
1940 | 1941 | ||
1941 | SMSC_TRACE(pdata, probe, "Driver Parameters:"); | 1942 | SMSC_TRACE(pdata, probe, "Driver Parameters:"); |
1942 | SMSC_TRACE(pdata, probe, "LAN base: 0x%08lX", | 1943 | SMSC_TRACE(pdata, probe, "LAN base: 0x%08lX", |
@@ -1952,6 +1953,17 @@ static int __devinit smsc911x_init(struct net_device *dev) | |||
1952 | return -ENODEV; | 1953 | return -ENODEV; |
1953 | } | 1954 | } |
1954 | 1955 | ||
1956 | /* | ||
1957 | * poll the READY bit in PMT_CTRL. Any other access to the device is | ||
1958 | * forbidden while this bit isn't set. Try for 100ms | ||
1959 | */ | ||
1960 | while (!(smsc911x_reg_read(pdata, PMT_CTRL) & PMT_CTRL_READY_) && --to) | ||
1961 | udelay(1000); | ||
1962 | if (to == 0) { | ||
1963 | pr_err("Device not READY in 100ms aborting\n"); | ||
1964 | return -ENODEV; | ||
1965 | } | ||
1966 | |||
1955 | /* Check byte ordering */ | 1967 | /* Check byte ordering */ |
1956 | byte_test = smsc911x_reg_read(pdata, BYTE_TEST); | 1968 | byte_test = smsc911x_reg_read(pdata, BYTE_TEST); |
1957 | SMSC_TRACE(pdata, probe, "BYTE_TEST: 0x%08X", byte_test); | 1969 | SMSC_TRACE(pdata, probe, "BYTE_TEST: 0x%08X", byte_test); |