Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266873
b: refs/heads/master
c: 79ee1dc
h: refs/heads/master
i:
  266871: d2d4db5
v: v3
  • Loading branch information
Srinivas Kandagatla authored and David S. Miller committed Oct 19, 2011
1 parent b14cde3 commit 2281833
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 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: 903e21e2eea036f6947f523f732e28b33a63ed0f
refs/heads/master: 79ee1dc32b945ad71248332f3a3b355332ad3376
13 changes: 10 additions & 3 deletions trunk/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static int stmmac_init_phy(struct net_device *dev)
struct phy_device *phydev;
char phy_id[MII_BUS_ID_SIZE + 3];
char bus_id[MII_BUS_ID_SIZE];

int interface = priv->plat->interface;
priv->oldlink = 0;
priv->speed = 0;
priv->oldduplex = -1;
Expand All @@ -314,14 +314,21 @@ static int stmmac_init_phy(struct net_device *dev)
priv->plat->phy_addr);
pr_debug("stmmac_init_phy: trying to attach to %s\n", phy_id);

phydev = phy_connect(dev, phy_id, &stmmac_adjust_link, 0,
priv->plat->interface);
phydev = phy_connect(dev, phy_id, &stmmac_adjust_link, 0, interface);

if (IS_ERR(phydev)) {
pr_err("%s: Could not attach to PHY\n", dev->name);
return PTR_ERR(phydev);
}

/* Stop Advertising 1000BASE Capability if interface is not GMII */
if ((interface) && ((interface == PHY_INTERFACE_MODE_MII) ||
(interface == PHY_INTERFACE_MODE_RMII))) {
phydev->supported &= (PHY_BASIC_FEATURES | SUPPORTED_Pause |
SUPPORTED_Asym_Pause);
priv->phydev->advertising = priv->phydev->supported;
}

/*
* Broken HW is sometimes missing the pull-up resistor on the
* MDIO line, which results in reads to non-existent devices returning
Expand Down

0 comments on commit 2281833

Please sign in to comment.