diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-03-11 17:19:14 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-03-11 17:19:14 +0000 |
commit | c1db1347f6f1b0dd17a89722fe5b82b66dbeb8e7 (patch) | |
tree | 4c413d95dfbdb3785afa0b2865fbce96295b2352 /target/linux/generic/files | |
parent | 4769d71b06b09e0d6bdf9a879360f8bdf766f96f (diff) | |
download | upstream-c1db1347f6f1b0dd17a89722fe5b82b66dbeb8e7.tar.gz upstream-c1db1347f6f1b0dd17a89722fe5b82b66dbeb8e7.tar.bz2 upstream-c1db1347f6f1b0dd17a89722fe5b82b66dbeb8e7.zip |
generic: ar8216: use usleep_range in ar8216_mii_{read,write}
msleep(1) can sleep for up to 20ms.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30885 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8216.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 7dd3282306..ffa561b36c 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -87,7 +87,7 @@ ar8216_mii_read(struct ar8216_priv *priv, int reg) mutex_lock(&bus->mdio_lock); bus->write(bus, 0x18, 0, page); - msleep(1); /* wait for the page switch to propagate */ + usleep_range(1000, 2000); /* wait for the page switch to propagate */ lo = bus->read(bus, 0x10 | r2, r1); hi = bus->read(bus, 0x10 | r2, r1 + 1); @@ -111,7 +111,7 @@ ar8216_mii_write(struct ar8216_priv *priv, int reg, u32 val) mutex_lock(&bus->mdio_lock); bus->write(bus, 0x18, 0, r3); - msleep(1); /* wait for the page switch to propagate */ + usleep_range(1000, 2000); /* wait for the page switch to propagate */ bus->write(bus, 0x10 | r2, r1 + 1, hi); bus->write(bus, 0x10 | r2, r1, lo); |