[RFC PATCH] net: stmmac: enable EEE in MII, GMII or RGMII only

Andrew Lunn andrew at lunn.ch
Tue Dec 5 10:03:51 PST 2017


>  bool stmmac_eee_init(struct stmmac_priv *priv)
>  {
>  	struct net_device *ndev = priv->dev;
> +	int interface = priv->plat->interface;
>  	unsigned long flags;
>  	bool ret = false;
>  
> +	if ((interface != PHY_INTERFACE_MODE_MII) &&
> +	    (interface != PHY_INTERFACE_MODE_GMII) &&
> +	    (interface != PHY_INTERFACE_MODE_RGMII) &&
> +	    (interface != PHY_INTERFACE_MODE_RGMII_ID) &&
> +	    (interface != PHY_INTERFACE_MODE_RGMII_TXID) &&
> +	    (interface != PHY_INTERFACE_MODE_RGMII_RXID))
> +		goto out;

phy_interface_mode_is_rgmii() will make this smaller.

      Andrew



More information about the linux-amlogic mailing list