Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2952528rwl; Mon, 27 Mar 2023 07:27:01 -0700 (PDT) X-Google-Smtp-Source: AKy350Zcm3wPyIB3yI38+95AUdW6ytj7DzfzgNz+d1zXsaLZ+PNxoP9fmissQFuJC1GR32Ovm5Xz X-Received: by 2002:aa7:c304:0:b0:502:212b:5d29 with SMTP id l4-20020aa7c304000000b00502212b5d29mr10422805edq.39.1679927220753; Mon, 27 Mar 2023 07:27:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679927220; cv=none; d=google.com; s=arc-20160816; b=S+pcNHUylZZ8v052fGD+G12E6sD340qhLnYYdTzotEnFWQ/cw6ArWtB5GaftieVHda rs1QPQ6XmOz0LPKtCMuuYlMiL7Bdd77xwVe0n5F3yt6MJ4d6wb0f/ff44h0LU8BGKFA5 4XLtIjPaog1Fj+dpSYeoSz3hh8bn/xnka1KY9NvVIs/RB2MQIp7sJB5oydfaa2PX+FrL 5Nso3jd+cQq+pQZoRdtWZdMCli2bNcP7CUbBQt6yVXIwuIX5HHGXyvkIyxRX0K72fZIv 3n7zb80uuemhe/ewDyYBdow23slJzfqz+MpXBz29qLaFFBadkyyybzO3s5mzlELd86tW VoXg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f6-20020a056402068600b004fd23e96380si27334370edy.28.2023.03.27.07.26.35; Mon, 27 Mar 2023 07:27:00 -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 S232479AbjC0OYJ (ORCPT + 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 ); 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 ; 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 ) 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 ) 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 ) id 1pgnjW-00Fkj2-RP; Mon, 27 Mar 2023 16:22:02 +0200 From: Oleksij Rempel To: Wei Fang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Heiner Kallweit , Russell King Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Shenwei Wang , Clark Wang , NXP Linux Team , Amit Cohen , Gal Pressman , Alexandru Tachici , Piergiorgio Beruto , Willem de Bruijn , Vladimir Oltean 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 */ -- 2.30.2