net: qcom/emac: do not call emac_mac_start twice
authorTimur Tabi <timur@codeaurora.org>
Fri, 27 Jan 2017 22:43:45 +0000 (16:43 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Jan 2017 00:07:02 +0000 (19:07 -0500)
emac_mac_start() uses information from the external PHY to program
the MAC, so it makes no sense to call it before the link is up.

Signed-off-by: Timur Tabi <timur@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/emac/emac-mac.c
drivers/net/ethernet/qualcomm/emac/emac-mac.h
drivers/net/ethernet/qualcomm/emac/emac.c

index 155e273ab3ded5ee373142e0b0cc94a57336f451..3f3cd00084499d02b606558e51e1cbda8df3969c 100644 (file)
@@ -556,7 +556,7 @@ void emac_mac_reset(struct emac_adapter *adpt)
        emac_reg_update32(adpt->base + EMAC_DMA_MAS_CTRL, 0, INT_RD_CLR_EN);
 }
 
-void emac_mac_start(struct emac_adapter *adpt)
+static void emac_mac_start(struct emac_adapter *adpt)
 {
        struct phy_device *phydev = adpt->phydev;
        u32 mac, csr1;
index f3aa24dc4a292003bbdf99b632f340d8f40e75ea..5028fb4bec2ba6cfea9fc49696dcbef1707783df 100644 (file)
@@ -230,7 +230,6 @@ struct emac_adapter;
 int  emac_mac_up(struct emac_adapter *adpt);
 void emac_mac_down(struct emac_adapter *adpt);
 void emac_mac_reset(struct emac_adapter *adpt);
-void emac_mac_start(struct emac_adapter *adpt);
 void emac_mac_stop(struct emac_adapter *adpt);
 void emac_mac_mode_config(struct emac_adapter *adpt);
 void emac_mac_rx_process(struct emac_adapter *adpt, struct emac_rx_queue *rx_q,
index 3e1be9107d55759445eb0851ba3b323d7ca35e75..75305ad436d5fe876115bf360cedfa87305dd20c 100644 (file)
@@ -280,8 +280,6 @@ static int emac_open(struct net_device *netdev)
                return ret;
        }
 
-       emac_mac_start(adpt);
-
        return 0;
 }