[net-next,v2,3/8] net: phy: Add mac_supports_eee variable for EEE support and LPI handling
Message ID | 20230327142202.3754446-4-o.rempel@pengutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1564811vqo; Mon, 27 Mar 2023 07:45:36 -0700 (PDT) X-Google-Smtp-Source: AK7set9qGR5qASp/EOkfhtWZrVj2VyuuFGA/vNS8AlyAtnB0a7+KgY8ZtLvh/B7H9qKHtpE0a9lt X-Received: by 2002:a05:6a20:6695:b0:cc:fa4b:3a6a with SMTP id o21-20020a056a20669500b000ccfa4b3a6amr12303195pzh.58.1679928336280; Mon, 27 Mar 2023 07:45:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679928336; cv=none; d=google.com; s=arc-20160816; b=zCMuENTg7a0UXAK1hZ3d734EyAZccMe7cLJjxBRNY9XjP1K5TlQsDwE8OAqBsEktlF CFikOPl/9+Fhj1Cv3N7PLkucKXvW4rZPHfxU3ZUW0VyysnM8oDEGIUXrrVZPGD+MInxn e31N0e2IFTqFZb8gS9u3OhPXyH5gpC1DFpk62ciVBpp8MUX+/0PAwZX8YGWDpIAC3aw5 wviR3UB85LQxrQqGn9b8ELJ3XKLkdJ1adKxFeGlxlE1vuggGxj3zbUGxourY3pgH3Qz2 OTLoEnlcLB9wVAgw3hw5Q35+kce8WKXmggI8y7hzEeJkl9SvlVt3RvInUr2at7PEpchC H/CQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hmjVQlXF5SpEk9CrStYCK8mK9s5ttk/L8isIdQB3N0k=; b=r2rVTzmAO73H6xPL5u3hBeEn+kgkpAUUDMMBlTrxk5JUnxwIw+EnMqXCR5I5Tx4M+v 2Jzy2HO4LPqt12T2v+Y+bqRcajTJdCmYoX8n74BQzWdl9ya5win8fXYf//aYy6yVN8ia c5E6mei2BVFWRI8uwjmfBgKcq53FdgUaB7S2tAde7Ido8l++2tkD3aEUSR3rFi/Rce/a hSWiqWpCoWkfZGdh/oaxTx1Foaq2sLtj7M0+3ZAdehNkBtTR0tM56Fnyuw20NyIr8Jf3 kAyW4un5pe5w4kMujVy4zmx+cfoQ7TX6bE1CG1c6ok3RPygpXNpau9kZMbP2eMUKyutn GbUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r137-20020a632b8f000000b0050fbc594e1asi13693298pgr.207.2023.03.27.07.45.23; Mon, 27 Mar 2023 07:45:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232514AbjC0OYJ (ORCPT <rfc822;makky5685@gmail.com> + 99 others); Mon, 27 Mar 2023 10:24:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232065AbjC0OXs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 27 Mar 2023 10:23:48 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87ED97D8C for <linux-kernel@vger.kernel.org>; Mon, 27 Mar 2023 07:22:14 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ore@pengutronix.de>) id 1pgnja-0008Hi-L1; Mon, 27 Mar 2023 16:22:06 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1pgnjX-0076IH-SB; Mon, 27 Mar 2023 16:22:03 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1pgnjW-00Fkj2-RP; Mon, 27 Mar 2023 16:22:02 +0200 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>, Amit Cohen <amcohen@nvidia.com>, Gal Pressman <gal@nvidia.com>, Alexandru Tachici <alexandru.tachici@analog.com>, Piergiorgio Beruto <piergiorgio.beruto@gmail.com>, Willem de Bruijn <willemb@google.com>, Vladimir Oltean <vladimir.oltean@nxp.com> Subject: [PATCH net-next v2 3/8] net: phy: Add mac_supports_eee variable for EEE support and LPI handling Date: Mon, 27 Mar 2023 16:21:57 +0200 Message-Id: <20230327142202.3754446-4-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230327142202.3754446-1-o.rempel@pengutronix.de> References: <20230327142202.3754446-1-o.rempel@pengutronix.de> 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.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761532535070644048?= X-GMAIL-MSGID: =?utf-8?q?1761532535070644048?= |
Series |
Make SmartEEE support controllable
|
|
Commit Message
Oleksij Rempel
March 27, 2023, 2:21 p.m. UTC
This commit introduces a new variable, mac_supports_eee, to the PHY
layer. This variable is used to indicate if a MAC provides EEE support
or is responsible for Low Power Idle (LPI) handling. The
mac_supports_eee variable should be used in conjunction with
is_smart_eee_phy to make proper configuration decisions based on the
capabilities of both the PHY and MAC.
By adding the mac_supports_eee variable, PHY drivers and the PHYlib
framework can better coordinate EEE and LPI management between the PHY
and MAC.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
include/linux/phy.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/phy.h b/include/linux/phy.h index 6622b59ab5a1..573ad3fc2bf7 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -548,6 +548,7 @@ struct macsec_ops; * @is_on_sfp_module: Set true if PHY is located on an SFP module. * @mac_managed_pm: Set true if MAC driver takes of suspending/resuming PHY * @is_smart_eee_phy: Set true if PHY is a Smart EEE PHY + * @mac_supports_eee: Set true if MAC supports EEE * @state: State of the PHY for management purposes * @dev_flags: Device-specific flags used by the PHY driver. * @@ -644,6 +645,7 @@ struct phy_device { unsigned is_on_sfp_module:1; unsigned mac_managed_pm:1; unsigned is_smart_eee_phy:1; + unsigned mac_supports_eee:1; unsigned autoneg:1; /* The most recently read link state */