提交 4f94a929 编写于 作者: S Steve Glendinning 提交者: David S. Miller

smsc75xx: eliminate unnecessary phy register read

Only a write is necessary to clear the interrupt status, and we
don't use the value from the preceding read operation.  This
patch eliminates the unnecessary read.
Signed-off-by: NSteve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7749622d
...@@ -508,9 +508,7 @@ static int smsc75xx_link_reset(struct usbnet *dev) ...@@ -508,9 +508,7 @@ static int smsc75xx_link_reset(struct usbnet *dev)
u16 lcladv, rmtadv; u16 lcladv, rmtadv;
int ret; int ret;
/* read and write to clear phy interrupt status */ /* write to clear phy interrupt status */
ret = smsc75xx_mdio_read(dev->net, mii->phy_id, PHY_INT_SRC);
check_warn_return(ret, "Error reading PHY_INT_SRC");
smsc75xx_mdio_write(dev->net, mii->phy_id, PHY_INT_SRC, smsc75xx_mdio_write(dev->net, mii->phy_id, PHY_INT_SRC,
PHY_INT_SRC_CLEAR_ALL); PHY_INT_SRC_CLEAR_ALL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册