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>
This commit is contained in:

committed by
David S. Miller

parent
438a62b16e
commit
56b88c25c5
@@ -275,6 +275,7 @@ static void stmmac_eee_ctrl_timer(unsigned long arg)
|
|||||||
*/
|
*/
|
||||||
bool stmmac_eee_init(struct stmmac_priv *priv)
|
bool stmmac_eee_init(struct stmmac_priv *priv)
|
||||||
{
|
{
|
||||||
|
char *phy_bus_name = priv->plat->phy_bus_name;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
/* Using PCS we cannot dial with the phy registers at this stage
|
/* 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))
|
(priv->pcs == STMMAC_PCS_RTBI))
|
||||||
goto out;
|
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. */
|
/* MAC core supports the EEE feature. */
|
||||||
if (priv->dma_cap.eee) {
|
if (priv->dma_cap.eee) {
|
||||||
int tx_lpi_timer = priv->tx_lpi_timer;
|
int tx_lpi_timer = priv->tx_lpi_timer;
|
||||||
|
Reference in New Issue
Block a user