aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2014-06-30 12:38:37 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-07 20:06:52 -0400
commit9162e7e5197e14c7488c54980d7cbdc2071f8085 (patch)
treed7bde139634d8d90cddaa730abe37a8bf17e2aeb
parente697b16b47d1c6d63859cfd44cecb888c7dde92f (diff)
tlan: Isolate external PHY when using internal PHY
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>
-rw-r--r--drivers/net/ethernet/ti/tlan.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
index 1f21764fea53..6078342fe3f2 100644
--- a/drivers/net/ethernet/ti/tlan.c
+++ b/drivers/net/ethernet/ti/tlan.c
@@ -2528,9 +2528,10 @@ static void tlan_phy_power_down(struct net_device *dev)
2528 value = MII_GC_PDOWN | MII_GC_LOOPBK | MII_GC_ISOLATE; 2528 value = MII_GC_PDOWN | MII_GC_LOOPBK | MII_GC_ISOLATE;
2529 tlan_mii_sync(dev->base_addr); 2529 tlan_mii_sync(dev->base_addr);
2530 tlan_mii_write_reg(dev, priv->phy[priv->phy_num], MII_GEN_CTL, value); 2530 tlan_mii_write_reg(dev, priv->phy[priv->phy_num], MII_GEN_CTL, value);
2531 if ((priv->phy_num == 0) && 2531 if ((priv->phy_num == 0) && (priv->phy[1] != TLAN_PHY_NONE)) {
2532 (priv->phy[1] != TLAN_PHY_NONE) && 2532 /* if using internal PHY, the external PHY must be powered on */
2533 (!(priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10))) { 2533 if (priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10)
2534 value = MII_GC_ISOLATE; /* just isolate it from MII */
2534 tlan_mii_sync(dev->base_addr); 2535 tlan_mii_sync(dev->base_addr);
2535 tlan_mii_write_reg(dev, priv->phy[1], MII_GEN_CTL, value); 2536 tlan_mii_write_reg(dev, priv->phy[1], MII_GEN_CTL, value);
2536 } 2537 }