Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299968
b: refs/heads/master
c: b140504
h: refs/heads/master
v: v3
  • Loading branch information
Steve Glendinning authored and David S. Miller committed May 1, 2012
1 parent 692b179 commit 78088f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a1d59d79fffdad4bb1b3b5d069da4c6c52db2e6
refs/heads/master: b140504aa3903feaba6f6bc77a4478a944fc12d2
12 changes: 7 additions & 5 deletions trunk/drivers/net/usb/smsc75xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,10 @@ static int smsc75xx_link_reset(struct usbnet *dev)
u16 lcladv, rmtadv;
int ret;

/* clear interrupt status */
/* read and 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, 0xffff);

ret = smsc75xx_write_reg(dev, INT_STS, INT_STS_CLEAR_ALL);
check_warn_return(ret, "Error writing INT_STS");
Expand Down Expand Up @@ -643,7 +644,7 @@ static int smsc75xx_set_mac_address(struct usbnet *dev)

static int smsc75xx_phy_initialize(struct usbnet *dev)
{
int bmcr, timeout = 0;
int bmcr, ret, timeout = 0;

/* Initialize MII structure */
dev->mii.dev = dev->net;
Expand Down Expand Up @@ -672,9 +673,10 @@ static int smsc75xx_phy_initialize(struct usbnet *dev)
ADVERTISE_ALL | ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP |
ADVERTISE_PAUSE_ASYM);

/* read to clear */
smsc75xx_mdio_read(dev->net, dev->mii.phy_id, PHY_INT_SRC);
check_warn_return(bmcr, "Error reading PHY_INT_SRC");
/* read and write to clear phy interrupt status */
ret = smsc75xx_mdio_read(dev->net, dev->mii.phy_id, PHY_INT_SRC);
check_warn_return(ret, "Error reading PHY_INT_SRC");
smsc75xx_mdio_write(dev->net, dev->mii.phy_id, PHY_INT_SRC, 0xffff);

smsc75xx_mdio_write(dev->net, dev->mii.phy_id, PHY_INT_MASK,
PHY_INT_MASK_DEFAULT);
Expand Down

0 comments on commit 78088f2

Please sign in to comment.