Skip to content

Commit

Permalink
tlan: Isolate external PHY when using internal PHY
Browse files Browse the repository at this point in the history
When using internal 10 Mbps PHY, isolate the external PHY from MII bus.
External PHY must be kept powered up because it passes TX from tlan chip to
network.

This fixes weird link-loss problems under load with OC-2326 card at 10 Mbps.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ondrej Zary authored and David S. Miller committed Jul 8, 2014
1 parent e697b16 commit 9162e7e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/net/ethernet/ti/tlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2528,9 +2528,10 @@ static void tlan_phy_power_down(struct net_device *dev)
value = MII_GC_PDOWN | MII_GC_LOOPBK | MII_GC_ISOLATE;
tlan_mii_sync(dev->base_addr);
tlan_mii_write_reg(dev, priv->phy[priv->phy_num], MII_GEN_CTL, value);
if ((priv->phy_num == 0) &&
(priv->phy[1] != TLAN_PHY_NONE) &&
(!(priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10))) {
if ((priv->phy_num == 0) && (priv->phy[1] != TLAN_PHY_NONE)) {
/* if using internal PHY, the external PHY must be powered on */
if (priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10)
value = MII_GC_ISOLATE; /* just isolate it from MII */
tlan_mii_sync(dev->base_addr);
tlan_mii_write_reg(dev, priv->phy[1], MII_GEN_CTL, value);
}
Expand Down

0 comments on commit 9162e7e

Please sign in to comment.