Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3964594pxb; Mon, 4 Oct 2021 13:52:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgmKprHfrv5gRWdj+jhomvO5olQmqYLZr7uznVwfdoLZX3eRjpXtybvAKcWkQHo98EXU1g X-Received: by 2002:a17:906:781:: with SMTP id l1mr19788649ejc.289.1633380737642; Mon, 04 Oct 2021 13:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633380737; cv=none; d=google.com; s=arc-20160816; b=Rv7gGeLPreLU1dsVXpehpl962rOpuegtmTZ9wqXtUoscJNENH4hSrhmB92c5xzirFu l2xBS/4vuc8TheXvXzKFiqVKe3mz9DrnpSaG3IVigc8Fe/ptXMwLrPjcf8Yu4p7xxsFG +9yi5pMFiUEgKWAypfrcHBJRrVzJOw77GlUra2tPckjs0slbi621m+pUazotOSRKyQPR 4sErWNBwJ4wxOD1n9HvHrWbiYpedEytyV71Ra4fOGhvXG2firjJ1Tu22yq88XsKeMeej oXSI5iF9EnhEUb+7CYwZgsxcjc/oXzNfKQwp/ntVYuEksmScqa3CkM3K0Gk6vHqA9lkW /wng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vvLVghnd6AZ1pR0y/a3yKZCu04TTav2p3nfKRGYY0bs=; b=ul5KI9XY4xKC26R6FQ7rb1S1u9q51fCcIXzT6Yv4S9UIJ4ST38axAwafxR86Wvt8vj YZaGSCM2cGZ0wEzMRv3LmoL4qZP8z5lrTEf/k3IMcM/81l71+IKvZ7W1gNhMEEGv29zP lgmAKd5zMyY0OPa2dmQXbfDbiown1iUG//wklKZhSwW0A98Gpibo8AWUjdWsqViALpQI ++oQNQh/dqB0LQsNwnTmq63XflGsuuxkAT++P9i4FoR3EpAqgU9n1eRFZcunmiuC8+Ee PzU3QXjg6HxLiNVwTqvaZDzu+HldIZgLr7kL3VUVhDbBXAwEtNdsIl06+xcglZZeIDyz dCAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VyhmMywC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s12si17950202edh.610.2021.10.04.13.51.54; Mon, 04 Oct 2021 13:52:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VyhmMywC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238647AbhJDNmx (ORCPT + 99 others); Mon, 4 Oct 2021 09:42:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:53358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238661AbhJDNlB (ORCPT ); Mon, 4 Oct 2021 09:41:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EF3D861A38; Mon, 4 Oct 2021 13:18:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633353536; bh=ShJlBkA40CjiAkPHOgUgb6ijLeB+QaFfCM6mx2ID/CQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VyhmMywC5p44wCF27AJ9rPbSBOvXPQI51lHr8CabHmbyPQo2PmRPbiJg/ZpBaycrp jDn65M8hJ2ac9nWJbW3wDEbZTj7GQSeclZjsZ7zYTDT2i2xijLnQFUUh7zATU2Gpwt BYuYVdJLBoaNdZimLE91nrd8MLEZvzP+9ao8Sy2s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Sit Wei Hong , Wong Vee Khee , "David S. Miller" , Sasha Levin Subject: [PATCH 5.14 135/172] net: stmmac: fix EEE init issue when paired with EEE capable PHYs Date: Mon, 4 Oct 2021 14:53:05 +0200 Message-Id: <20211004125049.321093067@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004125044.945314266@linuxfoundation.org> References: <20211004125044.945314266@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wong Vee Khee [ Upstream commit 656ed8b015f19bf3f6e6b3ddd9a4bb4aa5ca73e1 ] When STMMAC is paired with Energy-Efficient Ethernet(EEE) capable PHY, and the PHY is advertising EEE by default, we need to enable EEE on the xPCS side too, instead of having user to manually trigger the enabling config via ethtool. Fixed this by adding xpcs_config_eee() call in stmmac_eee_init(). Fixes: 7617af3d1a5e ("net: pcs: Introducing support for DWC xpcs Energy Efficient Ethernet") Cc: Michael Sit Wei Hong Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 2218bc3a624b..86151a817b79 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -486,6 +486,10 @@ bool stmmac_eee_init(struct stmmac_priv *priv) timer_setup(&priv->eee_ctrl_timer, stmmac_eee_ctrl_timer, 0); stmmac_set_eee_timer(priv, priv->hw, STMMAC_DEFAULT_LIT_LS, eee_tw_timer); + if (priv->hw->xpcs) + xpcs_config_eee(priv->hw->xpcs, + priv->plat->mult_fact_100ns, + true); } if (priv->plat->has_gmac4 && priv->tx_lpi_timer <= STMMAC_ET_MAX) { -- 2.33.0