Message ID | 20240223094425.691209-1-o.rempel@pengutronix.de |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-78060-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp479795dyb; Fri, 23 Feb 2024 01:48:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXm+jEm3sLhN2iiKGlkugQFB5rdyLP7d9scdTID+piCB5wz2eaQ/B5Ur9mO6EW90cEvcNgxWqOFJSU6DvH7czQcjznwAg== X-Google-Smtp-Source: AGHT+IHOHXcEuxbmVQ8rNg/WQOdWPrzzg31YgG3Q8dAlJ82KPsJWfDdIfetwyyLNGwB9dblWcdF5 X-Received: by 2002:a05:620a:1118:b0:787:1a78:fbe9 with SMTP id o24-20020a05620a111800b007871a78fbe9mr1404571qkk.56.1708681721230; Fri, 23 Feb 2024 01:48:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708681721; cv=pass; d=google.com; s=arc-20160816; b=Eg22zEjOc7sK+hRs7A1ysos83FYalfna0z3gSo0JgmAqYUe706X/5pSHy5AgI3xl64 Gqf4pyJk4PIz8xrgtyL4v575UU9Bi5D3kQvzwgQ3RFQrELGgZ0PxLJb8qNK0Km19lC/2 OG6jL5ocIP954EmfQWDXaSjBeVlGKOjDc0eTjNN/5B6Fo4f0deJg97uxxF5fhCMfjYp4 /69T1fgvohuc78yGNSGKExx0scnmPyJIHpaOVNFKnZNMeu249kmScd/Smmaa7p+JDB9M 1Xu0NTqIpZUUFDJ7hwHzH4ie3y3etgbME/R9VrvkXk7geejLuKDnR3pdkuZu3gyfathG BE1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=S3zen7RnA7iKCazEh9TUjl6C7hptKP8Cr09o43Kk47Q=; fh=Ie8Lg/4B6LRJEAkd22XcdyKITG9FXA4PEPaBJgtxF+0=; b=fuHLd8/l4Efcqt6AVr1uXaVFyBJQgj1Xok0RorTrZjyDoC5PF8SgjmPH38mB9tk8gT 7tB5oCMbDEfdbPGF3zOYnquB2w7mMNmLy+smtp4EUdRxcZ67Ijvzv1bdGHIQFi2q7F3J s1nsiAHasNQuCnqvSlCE6t4XECfkYDiCcW3HqwhVcM+sy+lg1TGpniyb2i4rJ7hY5Lud iiBD2T5FX4WyhRwutD4gqs6SFPLwVx8p2Q95zD+8yrJ1ckhUkrleBkY5gGvwpWwrh9U6 B3Bml/YPU1pWbQPk/tPdOurcXHMP5qvlqLa91D0cwqY2M2sOGS8UltnSXrktWdgNTRko KEMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-78060-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78060-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f11-20020a05620a20cb00b007876c39c716si9873645qka.258.2024.02.23.01.48.41 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 01:48:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78060-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-78060-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78060-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 017C51C249FD for <ouuuleilei@gmail.com>; Fri, 23 Feb 2024 09:48:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A2235FDB9; Fri, 23 Feb 2024 09:45:01 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 7B9B85D47A for <linux-kernel@vger.kernel.org>; Fri, 23 Feb 2024 09:44:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708681490; cv=none; b=k6Uvjov9e3CI4H9n6m6+DYaLZyzCg9Ipfll3vUfIGcCCwNXFnxOwxGOnfw7DCOWnGOMtXk2KgosMwvg+wg+razfrxVwiTkdcZv5pTIEcm3SPa3u5CrycqcQK2n6HMj1P6JM1KKHbqFH62sYJQl0VF4l4yQfS4tjBOP4l6l+glrM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708681490; c=relaxed/simple; bh=eGUoNpbhiUhfaIC/5XPE9QhKDcsiwIWCzFlVBZJ3nJM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=sXyuzVCdCBxpSKH0hxr1o0Ff0ECS7rW3P6BMA7Bike4YDL2vzhFZFD8vanzDpSI3WxrYlaM0G7t3YUD4s9pezbVE16+VSyTHotHnq2T14dXIc3fdO8NpJT2eQ5IGnqXtXnwGylLz3Usduz09FAjc5O8BV2kyLvOA1AZhFHrM/K8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ore@pengutronix.de>) id 1rdS6W-00080j-F4; Fri, 23 Feb 2024 10:44:28 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1rdS6V-002OkR-8m; Fri, 23 Feb 2024 10:44:27 +0100 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from <ore@pengutronix.de>) id 1rdS6V-002tpH-0e; Fri, 23 Feb 2024 10:44:27 +0100 From: Oleksij Rempel <o.rempel@pengutronix.de> To: Wei Fang <wei.fang@nxp.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk> Cc: Oleksij Rempel <o.rempel@pengutronix.de>, kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Shenwei Wang <shenwei.wang@nxp.com>, Clark Wang <xiaoning.wang@nxp.com>, NXP Linux Team <linux-imx@nxp.com> Subject: [PATCH net-next v6 0/8] net: ethernet: Rework EEE Date: Fri, 23 Feb 2024 10:44:17 +0100 Message-Id: <20240223094425.691209-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791682644633794328 X-GMAIL-MSGID: 1791682644633794328 |
Series |
net: ethernet: Rework EEE
|
|
Message
Oleksij Rempel
Feb. 23, 2024, 9:44 a.m. UTC
Hello all, with Andrew's permission I'll continue mainlining this patches: ============================================================== Most MAC drivers get EEE wrong. The API to the PHY is not very obvious, which is probably why. Rework the API, pushing most of the EEE handling into phylib core, leaving the MAC drivers to just enable/disable support for EEE in there change_link call back. MAC drivers are now expect to indicate to phylib if they support EEE. This will allow future patches to configure the PHY to advertise no EEE link modes when EEE is not supported. The information could also be used to enable SmartEEE if the PHY supports it. With these changes, the uAPI configuration eee_enable becomes a global on/off. tx-lpi must also be enabled before EEE is enabled. This fits the discussion here: https://lore.kernel.org/netdev/af880ce8-a7b8-138e-1ab9-8c89e662eecf@gmail.com/T/ This patchset puts in place all the infrastructure, and converts one MAC driver to the new API. Following patchsets will convert other MAC drivers, extend support into phylink, and when all MAC drivers are converted to the new scheme, clean up some unneeded code. v6: -- Reword different comments. See per patch change comments. v5: -- Rebase against latest netdev-next Use keee instead of eee struct v4 -- Only convert one MAC driver Drop all phylink code Conform to the uAPI discision. v3 -- Rework phylink code to add a new callback. Rework function to indicate clock should be stopped during LPI Andrew Lunn (7): net: phy: Add phydev->enable_tx_lpi to simplify adjust link callbacks net: phy: Add helper to set EEE Clock stop enable bit net: phy: Keep track of EEE configuration net: phy: Immediately call adjust_link if only tx_lpi_enabled changes net: phy: Add phy_support_eee() indicating MAC support EEE net: fec: Move fec_enet_eee_mode_set() and helper earlier net: fec: Fixup EEE Russell King (1): net: add helpers for EEE configuration drivers/net/ethernet/freescale/fec_main.c | 84 ++++++++++------------- drivers/net/phy/phy-c45.c | 11 ++- drivers/net/phy/phy.c | 55 ++++++++++++++- drivers/net/phy/phy_device.c | 28 ++++++++ include/linux/phy.h | 9 ++- include/net/eee.h | 38 ++++++++++ 6 files changed, 170 insertions(+), 55 deletions(-) create mode 100644 include/net/eee.h