Message ID | 1409037383-3213-4-git-send-email-peppe.cavallaro@st.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
From: Giuseppe Cavallaro <peppe.cavallaro@st.com> Date: Tue, 26 Aug 2014 09:16:22 +0200 > From: Giuseppe CAVALLARO <peppe.cavallaro@st.com> > > 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> > --- > 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 51a89d4..48a112f 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > @@ -276,6 +276,7 @@ static void stmmac_eee_ctrl_timer(unsigned long arg) > bool stmmac_eee_init(struct stmmac_priv *priv) > { > bool ret = false; > + char *phy_bus_name = priv->plat->phy_bus_name; > > /* Using PCS we cannot dial with the phy registers at this stage > * so we do not support extra feature like EEE. Please order local variable declarations in reverse-christmas-tree order, this means longer lines come before shorter ones. Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 51a89d4..48a112f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -276,6 +276,7 @@ static void stmmac_eee_ctrl_timer(unsigned long arg) bool stmmac_eee_init(struct stmmac_priv *priv) { bool ret = false; + char *phy_bus_name = priv->plat->phy_bus_name; /* Using PCS we cannot dial with the phy registers at this stage * so we do not support extra feature like EEE. @@ -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;