Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752880AbdLESEF (ORCPT ); Tue, 5 Dec 2017 13:04:05 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:47530 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752138AbdLESEB (ORCPT ); Tue, 5 Dec 2017 13:04:01 -0500 Date: Tue, 5 Dec 2017 19:03:51 +0100 From: Andrew Lunn To: Jerome Brunet Cc: Giuseppe Cavallaro , Alexandre Torgue , netdev@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] net: stmmac: enable EEE in MII, GMII or RGMII only Message-ID: <20171205180351.GT12805@lunn.ch> References: <20171205102809.4347-1-jbrunet@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171205102809.4347-1-jbrunet@baylibre.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 588 Lines: 18 > 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