Received: by 10.223.185.116 with SMTP id b49csp1037072wrg; Fri, 23 Feb 2018 10:46:14 -0800 (PST) X-Google-Smtp-Source: AH8x225V2RHSMu45BALiIRb0mItU6KWucZLNODl/F0o/9lVgRq/1Cuc4dbXXhm98ikMF0raDwv9W X-Received: by 10.99.179.77 with SMTP id x13mr2181206pgt.148.1519411574396; Fri, 23 Feb 2018 10:46:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519411574; cv=none; d=google.com; s=arc-20160816; b=Rcd+9qUACxMTH97BRhdNLCTBuZWBqyCkP7H2ijBC0O3VO5KoB1Laeo76EzbdyM06pz A/ZYj2FLhmm5wS72VriVDj+Vfgla1VAh+jXgOP430Pg/lfZyuZVzKGrLRNK+5wM0mkYK ovtYRmJXn6awZ/J1C56JtcY1u7pUjPPYq3SNSTpuXWHZQ7gwVhGGwG/nAd9h5IBB4+2f kP5m8Fcz9hs7igF3ZgpydeYh7O6QJdDTTmxdAOeLAcYGoGfhhKDPnCh04tmsnwgj5AY6 wH6Guyl+i9OzlhnrDZIm2tOKWDxa4SxPIuT1vjQSawvv0XhgjkLtLqkPCpQAcIS/yHbn 6IPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=3vK3EF4uuVyunA5EcZVQesnWH3TDya0cw5xbaPS+dDE=; b=S/8Wywe9oFVb3ASTCHBsitDCeGXP4fgxawQWf/oTLtkOAl/igjducvqPYDpYdFe7u5 +yD9LXI82RwtSSl2KG7t5l2+u1JNtatBG2nz4zF+KrRYA3kvz2tMlg0fQopPktCdKp4h AgoYI2eijH1V7a/nq/oOcA8fvFgEtHzcwkj8Lex0NAou5qEetvgFpHfRyYb3KbAnwWbu 1ziyLIo20Bxd1Cdfp8dgCViCpiDVSqr6adGLXfk89tIkBTh6iDpROjcuybdywmg6J9hq CI3xlytv1n7fzTEUYjy7L/M/npDM9zqAHSUGu1dsxsM8FYuLg6M9y+PgBltBioB7DVCk EFjg== 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 63-v6si2149429pla.526.2018.02.23.10.46.00; Fri, 23 Feb 2018 10:46:14 -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 S933798AbeBWSp1 (ORCPT + 99 others); Fri, 23 Feb 2018 13:45:27 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43306 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933089AbeBWSpY (ORCPT ); Fri, 23 Feb 2018 13:45:24 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D85601244; Fri, 23 Feb 2018 18:45:23 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shaohui Xie , Yangbo Lu , Claudiu Manoil , Andrew Lunn , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 071/145] gianfar: Disable EEE autoneg by default Date: Fri, 23 Feb 2018 19:26:17 +0100 Message-Id: <20180223170733.867043636@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170724.669759283@linuxfoundation.org> References: <20180223170724.669759283@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Claudiu Manoil [ Upstream commit b6b5e8a691185606dfffff3198c89e3b4fd9d4f6 ] This controller does not support EEE, but it may connect to a PHY which supports EEE and advertises EEE by default, while its link partner also advertises EEE. If this happens, the PHY enters low power mode when the traffic rate is low and causes packet loss. This patch disables EEE advertisement by default for any PHY that gianfar connects to, to prevent the above unwanted outcome. Signed-off-by: Shaohui Xie Tested-by: Yangbo Lu Signed-off-by: Claudiu Manoil Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/freescale/gianfar.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -1789,6 +1789,7 @@ static int init_phy(struct net_device *d GFAR_SUPPORTED_GBIT : 0; phy_interface_t interface; struct phy_device *phydev; + struct ethtool_eee edata; priv->oldlink = 0; priv->oldspeed = 0; @@ -1813,6 +1814,10 @@ static int init_phy(struct net_device *d /* Add support for flow control, but don't advertise it by default */ phydev->supported |= (SUPPORTED_Pause | SUPPORTED_Asym_Pause); + /* disable EEE autoneg, EEE not supported by eTSEC */ + memset(&edata, 0, sizeof(struct ethtool_eee)); + phy_ethtool_set_eee(phydev, &edata); + return 0; }