diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-01-18 14:47:37 +0300 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-18 14:47:37 +0300 |
commit | 0c54de146ef4303ed3c5879b043894c8db637507 (patch) | |
tree | a4ff5bf27ffd2c4b71271b42014a0040490c7271 /drivers/net/usb/rtl8150.c | |
parent | 8faba6121566248330e738d25a2c43d7500fb9f0 (diff) | |
parent | 7dc9c484a71525794ca05cf7a47f283f1b54cd12 (diff) | |
download | linux-0c54de146ef4303ed3c5879b043894c8db637507.tar.xz |
Merge branch 'sh/stable-updates'
Diffstat (limited to 'drivers/net/usb/rtl8150.c')
-rw-r--r-- | drivers/net/usb/rtl8150.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index f14d225404da..fd19db0d2504 100644 --- a/drivers/net/usb/rtl8150.c +++ b/drivers/net/usb/rtl8150.c @@ -270,7 +270,7 @@ static int read_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 * reg) get_registers(dev, PHYCNT, 1, data); } while ((data[0] & PHY_GO) && (i++ < MII_TIMEOUT)); - if (i < MII_TIMEOUT) { + if (i <= MII_TIMEOUT) { get_registers(dev, PHYDAT, 2, data); *reg = data[0] | (data[1] << 8); return 0; @@ -295,7 +295,7 @@ static int write_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 reg) get_registers(dev, PHYCNT, 1, data); } while ((data[0] & PHY_GO) && (i++ < MII_TIMEOUT)); - if (i < MII_TIMEOUT) + if (i <= MII_TIMEOUT) return 0; else return 1; |