diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2014-08-28 10:11:43 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-01 09:01:06 +0400 |
commit | 56b88c25c543f1d4b1fff7f1c0267f59f53c261f (patch) | |
tree | 51cd22e050905dbd151f79eb79e44de26eeca2ce /drivers/net/ethernet/stmicro | |
parent | 438a62b16e0aeff5c4a5ab457343cebe4d7278da (diff) | |
download | linux-56b88c25c543f1d4b1fff7f1c0267f59f53c261f.tar.xz |
stmmac: never check EEE in case of a switch is attached
This patch is to skip the EEE initialisation when the stmmac
is using a switch (with a fixed phy support).
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index df15f00b1246..3b8b57e3bd20 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -275,6 +275,7 @@ static void stmmac_eee_ctrl_timer(unsigned long arg) */ bool stmmac_eee_init(struct stmmac_priv *priv) { + char *phy_bus_name = priv->plat->phy_bus_name; bool ret = false; /* Using PCS we cannot dial with the phy registers at this stage @@ -284,6 +285,10 @@ bool stmmac_eee_init(struct stmmac_priv *priv) (priv->pcs == STMMAC_PCS_RTBI)) goto out; + /* Never init EEE in case of a switch is attached */ + if (phy_bus_name && (!strcmp(phy_bus_name, "fixed"))) + goto out; + /* MAC core supports the EEE feature. */ if (priv->dma_cap.eee) { int tx_lpi_timer = priv->tx_lpi_timer; |