summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKaricheri, Muralidharan <m-karicheri2@ti.com>2015-04-27 14:12:43 -0400
committerDavid S. Miller <davem@davemloft.net>2015-04-27 23:11:49 -0400
commit8e046d68ba719a5bb95912c154c6314472edccfa (patch)
tree92246a0b937157a9e3bb691043a9c8821f318189 /drivers
parent2decb2682f80759f631c8332f9a2a34a02150a03 (diff)
downloadlinux-sh-8e046d68ba719a5bb95912c154c6314472edccfa.tar.gz
net: netcp: remove call to netif_carrier_(on/off) for MAC to Phy interface
Currently when interface type is MAC to Phy, netif_carrier_(on/off) is called which is not needed as Phy lib already updates the carrier status to net stack. This is needed only for other interface types Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/ti/netcp_ethss.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c
index 2bef655279f3..9b7e0a34c98b 100644
--- a/drivers/net/ethernet/ti/netcp_ethss.c
+++ b/drivers/net/ethernet/ti/netcp_ethss.c
@@ -1765,7 +1765,9 @@ static void netcp_ethss_link_state_action(struct gbe_priv *gbe_dev,
ALE_PORT_STATE,
ALE_PORT_STATE_FORWARD);
- if (ndev && slave->open)
+ if (ndev && slave->open &&
+ slave->link_interface != SGMII_LINK_MAC_PHY &&
+ slave->link_interface != XGMII_LINK_MAC_PHY)
netif_carrier_on(ndev);
} else {
writel(mac_control, GBE_REG_ADDR(slave, emac_regs,
@@ -1773,7 +1775,9 @@ static void netcp_ethss_link_state_action(struct gbe_priv *gbe_dev,
cpsw_ale_control_set(gbe_dev->ale, slave->port_num,
ALE_PORT_STATE,
ALE_PORT_STATE_DISABLE);
- if (ndev)
+ if (ndev &&
+ slave->link_interface != SGMII_LINK_MAC_PHY &&
+ slave->link_interface != XGMII_LINK_MAC_PHY)
netif_carrier_off(ndev);
}