summaryrefslogtreecommitdiff
path: root/drivers/net/usb/smsc75xx.c
diff options
context:
space:
mode:
authorSteve Glendinning <steve.glendinning@shawell.net>2012-04-30 11:56:51 +0400
committerDavid S. Miller <davem@davemloft.net>2012-05-01 05:52:40 +0400
commitcb8722d30c20386e4d4b4bc3a2ceceacd35f818a (patch)
tree6626b7661ce460f195e60c69260b84cdc1160c8c /drivers/net/usb/smsc75xx.c
parent7bdd305e024d78cfb4f32a1badeb5562791ee5b8 (diff)
downloadlinux-cb8722d30c20386e4d4b4bc3a2ceceacd35f818a.tar.xz
smsc75xx: fix mdio reads and writes
smsc75xx needs MII_ACCESS_BUSY to be set to correctly trigger mdio I/O. Note smsc75xx is different from smsc95xx in this regard. Signed-off-by: Stephane Fillod <fillods@users.sf.net> Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/smsc75xx.c')
-rw-r--r--drivers/net/usb/smsc75xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index b1b4649802aa..f97207a709d6 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -171,7 +171,7 @@ static int smsc75xx_mdio_read(struct net_device *netdev, int phy_id, int idx)
idx &= dev->mii.reg_num_mask;
addr = ((phy_id << MII_ACCESS_PHY_ADDR_SHIFT) & MII_ACCESS_PHY_ADDR)
| ((idx << MII_ACCESS_REG_ADDR_SHIFT) & MII_ACCESS_REG_ADDR)
- | MII_ACCESS_READ;
+ | MII_ACCESS_READ | MII_ACCESS_BUSY;
ret = smsc75xx_write_reg(dev, MII_ACCESS, addr);
check_warn_goto_done(ret, "Error writing MII_ACCESS");
@@ -210,7 +210,7 @@ static void smsc75xx_mdio_write(struct net_device *netdev, int phy_id, int idx,
idx &= dev->mii.reg_num_mask;
addr = ((phy_id << MII_ACCESS_PHY_ADDR_SHIFT) & MII_ACCESS_PHY_ADDR)
| ((idx << MII_ACCESS_REG_ADDR_SHIFT) & MII_ACCESS_REG_ADDR)
- | MII_ACCESS_WRITE;
+ | MII_ACCESS_WRITE | MII_ACCESS_BUSY;
ret = smsc75xx_write_reg(dev, MII_ACCESS, addr);
check_warn_goto_done(ret, "Error writing MII_ACCESS");