smsc75xx: fix phy interrupt acknowledge
smsc75xx phy interrupt acknowledge needs an mdio_write to clear PHY_INT_SRC instead of just a read like in smsc95xx. 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>
This commit is contained in:
committed by
David S. Miller
parent
8a1d59d79f
commit
b140504aa3
@@ -508,9 +508,10 @@ static int smsc75xx_link_reset(struct usbnet *dev)
|
|||||||
u16 lcladv, rmtadv;
|
u16 lcladv, rmtadv;
|
||||||
int ret;
|
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);
|
ret = smsc75xx_mdio_read(dev->net, mii->phy_id, PHY_INT_SRC);
|
||||||
check_warn_return(ret, "Error reading 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);
|
ret = smsc75xx_write_reg(dev, INT_STS, INT_STS_CLEAR_ALL);
|
||||||
check_warn_return(ret, "Error writing INT_STS");
|
check_warn_return(ret, "Error writing INT_STS");
|
||||||
@@ -643,7 +644,7 @@ static int smsc75xx_set_mac_address(struct usbnet *dev)
|
|||||||
|
|
||||||
static int smsc75xx_phy_initialize(struct usbnet *dev)
|
static int smsc75xx_phy_initialize(struct usbnet *dev)
|
||||||
{
|
{
|
||||||
int bmcr, timeout = 0;
|
int bmcr, ret, timeout = 0;
|
||||||
|
|
||||||
/* Initialize MII structure */
|
/* Initialize MII structure */
|
||||||
dev->mii.dev = dev->net;
|
dev->mii.dev = dev->net;
|
||||||
@@ -672,9 +673,10 @@ static int smsc75xx_phy_initialize(struct usbnet *dev)
|
|||||||
ADVERTISE_ALL | ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP |
|
ADVERTISE_ALL | ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP |
|
||||||
ADVERTISE_PAUSE_ASYM);
|
ADVERTISE_PAUSE_ASYM);
|
||||||
|
|
||||||
/* read to clear */
|
/* read and write to clear phy interrupt status */
|
||||||
smsc75xx_mdio_read(dev->net, dev->mii.phy_id, PHY_INT_SRC);
|
ret = smsc75xx_mdio_read(dev->net, dev->mii.phy_id, PHY_INT_SRC);
|
||||||
check_warn_return(bmcr, "Error reading 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,
|
smsc75xx_mdio_write(dev->net, dev->mii.phy_id, PHY_INT_MASK,
|
||||||
PHY_INT_MASK_DEFAULT);
|
PHY_INT_MASK_DEFAULT);
|
||||||
|
Reference in New Issue
Block a user