Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758260AbaFUPGH (ORCPT ); Sat, 21 Jun 2014 11:06:07 -0400 Received: from ns.gsystem.sk ([62.176.172.50]:54733 "EHLO ns.gsystem.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755133AbaFUPGD (ORCPT ); Sat, 21 Jun 2014 11:06:03 -0400 From: Ondrej Zary To: Samuel Chessman Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/11] tlan: Isolate external PHY when using internal PHY Date: Sat, 21 Jun 2014 16:47:56 +0200 Message-Id: <1403362076-7777-12-git-send-email-linux@rainbow-software.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1403362076-7777-1-git-send-email-linux@rainbow-software.org> References: <1403362076-7777-1-git-send-email-linux@rainbow-software.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/ethernet/ti/tlan.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c index 3c88ac2..89de65e 100644 --- a/drivers/net/ethernet/ti/tlan.c +++ b/drivers/net/ethernet/ti/tlan.c @@ -2529,9 +2529,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); } -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/