diff options
author | Steve Glendinning <steve.glendinning@shawell.net> | 2012-11-06 00:08:53 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-13 14:25:50 -0500 |
commit | 80928805babfd97b6f1721dd942a55dd2e7813ea (patch) | |
tree | 59874901a3b7358aecba22c88a0fe759a10d42ef /drivers/net/usb/smsc95xx.c | |
parent | 0c9f79be295c99ac7e4b569ca493d75fdcc19e4e (diff) |
smsc95xx: set MII_BUSY bit to read/write PHY regs
The device datasheet specifies the BUSY bit must be set when reading
or writing phy registers. This patch ensures we do that.
Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/smsc95xx.c')
-rw-r--r-- | drivers/net/usb/smsc95xx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 3286166415b4..362cb8cfeb92 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -184,7 +184,7 @@ static int smsc95xx_mdio_read(struct net_device *netdev, int phy_id, int idx) /* set the address, index & direction (read from PHY) */ phy_id &= dev->mii.phy_id_mask; idx &= dev->mii.reg_num_mask; - addr = (phy_id << 11) | (idx << 6) | MII_READ_; + addr = (phy_id << 11) | (idx << 6) | MII_READ_ | MII_BUSY_; ret = smsc95xx_write_reg(dev, MII_ADDR, addr); check_warn_goto_done(ret, "Error writing MII_ADDR"); @@ -221,7 +221,7 @@ static void smsc95xx_mdio_write(struct net_device *netdev, int phy_id, int idx, /* set the address, index & direction (write to PHY) */ phy_id &= dev->mii.phy_id_mask; idx &= dev->mii.reg_num_mask; - addr = (phy_id << 11) | (idx << 6) | MII_WRITE_; + addr = (phy_id << 11) | (idx << 6) | MII_WRITE_ | MII_BUSY_; ret = smsc95xx_write_reg(dev, MII_ADDR, addr); check_warn_goto_done(ret, "Error writing MII_ADDR"); |