diff options
Diffstat (limited to 'drivers/net')
-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) | |||
270 | get_registers(dev, PHYCNT, 1, data); | 270 | get_registers(dev, PHYCNT, 1, data); |
271 | } while ((data[0] & PHY_GO) && (i++ < MII_TIMEOUT)); | 271 | } while ((data[0] & PHY_GO) && (i++ < MII_TIMEOUT)); |
272 | 272 | ||
273 | if (i < MII_TIMEOUT) { | 273 | if (i <= MII_TIMEOUT) { |
274 | get_registers(dev, PHYDAT, 2, data); | 274 | get_registers(dev, PHYDAT, 2, data); |
275 | *reg = data[0] | (data[1] << 8); | 275 | *reg = data[0] | (data[1] << 8); |
276 | return 0; | 276 | return 0; |
@@ -295,7 +295,7 @@ static int write_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 reg) | |||
295 | get_registers(dev, PHYCNT, 1, data); | 295 | get_registers(dev, PHYCNT, 1, data); |
296 | } while ((data[0] & PHY_GO) && (i++ < MII_TIMEOUT)); | 296 | } while ((data[0] & PHY_GO) && (i++ < MII_TIMEOUT)); |
297 | 297 | ||
298 | if (i < MII_TIMEOUT) | 298 | if (i <= MII_TIMEOUT) |
299 | return 0; | 299 | return 0; |
300 | else | 300 | else |
301 | return 1; | 301 | return 1; |