aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorSteve Glendinning <steve.glendinning@shawell.net>2012-11-05 19:08:53 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-13 14:25:50 -0500
commit80928805babfd97b6f1721dd942a55dd2e7813ea (patch)
tree59874901a3b7358aecba22c88a0fe759a10d42ef /drivers/net
parent0c9f79be295c99ac7e4b569ca493d75fdcc19e4e (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')
-rw-r--r--drivers/net/usb/smsc95xx.c4
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)
184 /* set the address, index & direction (read from PHY) */ 184 /* set the address, index & direction (read from PHY) */
185 phy_id &= dev->mii.phy_id_mask; 185 phy_id &= dev->mii.phy_id_mask;
186 idx &= dev->mii.reg_num_mask; 186 idx &= dev->mii.reg_num_mask;
187 addr = (phy_id << 11) | (idx << 6) | MII_READ_; 187 addr = (phy_id << 11) | (idx << 6) | MII_READ_ | MII_BUSY_;
188 ret = smsc95xx_write_reg(dev, MII_ADDR, addr); 188 ret = smsc95xx_write_reg(dev, MII_ADDR, addr);
189 check_warn_goto_done(ret, "Error writing MII_ADDR"); 189 check_warn_goto_done(ret, "Error writing MII_ADDR");
190 190
@@ -221,7 +221,7 @@ static void smsc95xx_mdio_write(struct net_device *netdev, int phy_id, int idx,
221 /* set the address, index & direction (write to PHY) */ 221 /* set the address, index & direction (write to PHY) */
222 phy_id &= dev->mii.phy_id_mask; 222 phy_id &= dev->mii.phy_id_mask;
223 idx &= dev->mii.reg_num_mask; 223 idx &= dev->mii.reg_num_mask;
224 addr = (phy_id << 11) | (idx << 6) | MII_WRITE_; 224 addr = (phy_id << 11) | (idx << 6) | MII_WRITE_ | MII_BUSY_;
225 ret = smsc95xx_write_reg(dev, MII_ADDR, addr); 225 ret = smsc95xx_write_reg(dev, MII_ADDR, addr);
226 check_warn_goto_done(ret, "Error writing MII_ADDR"); 226 check_warn_goto_done(ret, "Error writing MII_ADDR");
227 227