From patchwork Tue Apr 23 18:33:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13640551 X-Patchwork-Delegate: kuba@kernel.org Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D47A023775; Tue, 23 Apr 2024 18:33:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.209 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713897229; cv=none; b=Nem7SzPdoWIc29fRYzdd2g9yOpNtpqvf+k7yjZbQXKrjYWirc6E7UL+PHJ8r8qz0y0t/XH4HZwKXiek0UzFqW8Zz+FRSQaVCl3ufBKoaE/NgxSBB9Tuyu/+kJJYWOkWHwxSDAkpgThAkB/xy071LEhsPZjwM7ILrDikszFQJJqs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713897229; c=relaxed/simple; bh=WXA2ZfSFb7CbPUJRrqZdpAtOjK+DU+4PHhQxaWIgaCo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LZ1W7i6EwjN5F1lE0tOEhB3FP0JQ4aiw/hWPigMq7wPwTwkMCpmQXRgfSHUjXsM98r84YRpeCB+de+QnyiHUrb3zA6fVU76JJFNmRzOuMPhjRFgFrixdQLwSjUzJzqvJBC7YcDGTnCtuXlpsw8gF+qtRHgEbiGiC7yiK+XA+3bA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=XGslnqNG; arc=none smtp.client-ip=192.19.144.209 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="XGslnqNG" Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id B8930C00281B; Tue, 23 Apr 2024 11:33:41 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com B8930C00281B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1713897221; bh=WXA2ZfSFb7CbPUJRrqZdpAtOjK+DU+4PHhQxaWIgaCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XGslnqNGknPdxUopqHaujYiNG7PSj7tAYSIJWW3hxfn1BvxoydIbxS0FMYcTR8H8q j71rzh++YAIEFODroVXXXmtIsr256j1MJ5UTXeCASix5AScNJYzGeqN9K45zuTAR7Q EE2j3zRl5LDTN6OViWWDwONQXRrfDqdVERxgf66w= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id D1E7C18041CAC7; Tue, 23 Apr 2024 11:33:39 -0700 (PDT) From: Florian Fainelli To: netdev@vger.kernel.org Cc: Florian Fainelli , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , linux-kernel@vger.kernel.org (open list) Subject: [PATCH net-next 6/8] net: dsa: b53: Call b53_eee_init() from b53_mac_link_up() Date: Tue, 23 Apr 2024 11:33:37 -0700 Message-Id: <20240423183339.1368511-7-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423183339.1368511-1-florian.fainelli@broadcom.com> References: <20240423183339.1368511-1-florian.fainelli@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org And make sure this is done for the MLO_AN_PHY case, where it actually makes sense, contrary to b53_adjust_link() which only did it for fixed-PHY configurations where it does not make sense. Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index 18b87e903943..a4b50ee97f87 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -1481,9 +1481,13 @@ static void b53_phylink_mac_link_up(struct dsa_switch *ds, int port, bool tx_pause, bool rx_pause) { struct b53_device *dev = ds->priv; + struct ethtool_keee *p = &dev->ports[port].eee; - if (mode == MLO_AN_PHY) + if (mode == MLO_AN_PHY) { + /* Re-negotiate EEE if it was enabled already */ + p->eee_enabled = b53_eee_init(ds, port, phydev); return; + } if (mode == MLO_AN_FIXED) { /* Force flow control on BCM5301x's CPU port */