Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323237
b: refs/heads/master
c: b629820
h: refs/heads/master
i:
  323235: a7c8aa3
v: v3
  • Loading branch information
Marek Vasut authored and David S. Miller committed Sep 27, 2012
1 parent e02abbf commit 7856015
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 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: a3cff128c970da8400875c8893d68ac735e783fb
refs/heads/master: b629820d18fa65cc598390e4b9712fd5f83ee693
28 changes: 27 additions & 1 deletion trunk/drivers/net/phy/smsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,32 @@ static int smsc_phy_config_init(struct phy_device *phydev)
return smsc_phy_ack_interrupt (phydev);
}

static int lan87xx_config_init(struct phy_device *phydev)
{
/*
* Make sure the EDPWRDOWN bit is NOT set. Setting this bit on
* LAN8710/LAN8720 PHY causes the PHY to misbehave, likely due
* to a bug on the chip.
*
* When the system is powered on with the network cable being
* disconnected all the way until after ifconfig ethX up is
* issued for the LAN port with this PHY, connecting the cable
* afterwards does not cause LINK change detection, while the
* expected behavior is the Link UP being detected.
*/
int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS);
if (rc < 0)
return rc;

rc &= ~MII_LAN83C185_EDPWRDOWN;

rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS, rc);
if (rc < 0)
return rc;

return smsc_phy_ack_interrupt(phydev);
}

static int lan911x_config_init(struct phy_device *phydev)
{
return smsc_phy_ack_interrupt(phydev);
Expand Down Expand Up @@ -162,7 +188,7 @@ static struct phy_driver smsc_phy_driver[] = {
/* basic functions */
.config_aneg = genphy_config_aneg,
.read_status = genphy_read_status,
.config_init = smsc_phy_config_init,
.config_init = lan87xx_config_init,

/* IRQ related */
.ack_interrupt = smsc_phy_ack_interrupt,
Expand Down

0 comments on commit 7856015

Please sign in to comment.