Received: by 10.223.185.116 with SMTP id b49csp6358486wrg; Wed, 28 Feb 2018 08:07:44 -0800 (PST) X-Google-Smtp-Source: AH8x2256l1cM1tnoLHVnqOAx26+lYngWsUdSplKsAG5+5spNoT0Xbq2v2VA4+EOTThy5XL1vOzC6 X-Received: by 10.99.96.206 with SMTP id u197mr14129352pgb.261.1519834064301; Wed, 28 Feb 2018 08:07:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519834064; cv=none; d=google.com; s=arc-20160816; b=ot0AhSMCxPNtD6lBNda5ijtzBa4VcLPg+rJpuOcWgS+47cB/TzYPiWO3SaV4w1cvD1 zSoC/q+P7KwFA9YjlMobV5TW5vWnZzrtwh60cbZsAyNZ1M9+aDCxw2LFaLh3sbTr3VzG e+oRzfy0gI/HOFFeTwOfo9CvT1gshrQKn5Pvo4HL6G6kQQRKj/dzUkV+dWPmLy2DFCLq pJFZrbrEDyD/1j2AnHDAUSdDcueV8q8nGAS2eYivbFagd5riTdUrjwPKrPPYckApavkv WQ02ZFAlq9qKirtP7lg8Tv7Ensxme9pc9p0NtxWzrI5UBcXV7lUouySUhn3DtWdI/GuD tGsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=sz4SFgNkwcbQsnLMVEeoI3FkzgKMAObh8+Z2OM/WEto=; b=hDAK5uHTd2jrdmSm4OV6tnfWcIEU6etOoWLahy3CIf0ySmGriXkQDRILmK1/Ab0xcA hYszIbw39RCUT/765R9dY254ko7OR0MflRO3iN1gUkUhNL4i+LTvstT86WFFRweYVLnT kZu59S+VLDJ7obOuriP2OoVjmSGPDZ1SzOLxi5tQm5DXqxw2dLU5x/DVAZI7ztpRmXfp 73fsutSynTXeSHIJ0LE1KbdTyxgMQqZ4Q4r1Zax1+uEUQpShbsEfrE1CZ1LWMU0+A8K+ a4VWJeKvie+DJbtGRxfKvu/SW8UN05t2pL0nLZLdHDuT0TVO+ot3Ezz1KcFGsD+p8tCb zebA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si1093429pgf.145.2018.02.28.08.07.29; Wed, 28 Feb 2018 08:07:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934533AbeB1QFd (ORCPT + 99 others); Wed, 28 Feb 2018 11:05:33 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34890 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934501AbeB1QFa (ORCPT ); Wed, 28 Feb 2018 11:05:30 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yj-0006XW-A8; Wed, 28 Feb 2018 15:22:21 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yi-0000Bk-Fw; Wed, 28 Feb 2018 15:22:20 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Jerome Brunet" , "David S. Miller" , "Arnaud Patard" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 167/254] net: stmmac: enable EEE in MII, GMII or RGMII only In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Jerome Brunet commit 879626e3a52630316d817cbda7cec9a5446d1d82 upstream. Note in the databook - Section 4.4 - EEE : " The EEE feature is not supported when the MAC is configured to use the TBI, RTBI, SMII, RMII or SGMII single PHY interface. Even if the MAC supports multiple PHY interfaces, you should activate the EEE mode only when the MAC is operating with GMII, MII, or RGMII interface." Applying this restriction solves a stability issue observed on Amlogic gxl platforms operating with RMII interface and the internal PHY. Fixes: 83bf79b6bb64 ("stmmac: disable at run-time the EEE if not supported") Signed-off-by: Jerome Brunet Tested-by: Arnaud Patard Signed-off-by: David S. Miller [bwh: Backported to 3.16: adjst context] Signed-off-by: Ben Hutchings --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -275,8 +275,14 @@ static void stmmac_eee_ctrl_timer(unsign */ bool stmmac_eee_init(struct stmmac_priv *priv) { + int interface = priv->plat->interface; bool ret = false; + if ((interface != PHY_INTERFACE_MODE_MII) && + (interface != PHY_INTERFACE_MODE_GMII) && + !phy_interface_mode_is_rgmii(interface)) + goto out; + /* Using PCS we cannot dial with the phy registers at this stage * so we do not support extra feature like EEE. */