|
|
@@ -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;
|
|
|
@@ -316,10 +321,9 @@ bool stmmac_eee_init(struct stmmac_priv *priv)
|
|
|
priv->hw->mac->set_eee_timer(priv->hw,
|
|
|
STMMAC_DEFAULT_LIT_LS,
|
|
|
tx_lpi_timer);
|
|
|
- } else
|
|
|
- /* Set HW EEE according to the speed */
|
|
|
- priv->hw->mac->set_eee_pls(priv->hw,
|
|
|
- priv->phydev->link);
|
|
|
+ }
|
|
|
+ /* Set HW EEE according to the speed */
|
|
|
+ priv->hw->mac->set_eee_pls(priv->hw, priv->phydev->link);
|
|
|
|
|
|
pr_debug("stmmac: Energy-Efficient Ethernet initialized\n");
|
|
|
|