From patchwork Mon Oct 10 20:48:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shenwei Wang X-Patchwork-Id: 13003258 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 506E9C433FE for ; Mon, 10 Oct 2022 20:50:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XuQGJSu8AUhu2zf7M3l8Wtxs63mH5SNzhPxOsmwxKyw=; b=npSK83fQf2KNH5 kbpcAVGt8a86OfVWutpQnpCWnSfWx3jkTlR/FJ+atJhDpYWv6qpex9VEDmYnja+XuxOxIY/xTkriK MLCIrh02eAYTo6EGfy5Gpy629jo64oa/ERHtsfX6WevhXjEwAc45364ghUy9sn5xCWBNlA0tNa8BA SjYJIYdjnNbcM3asoV1TfKWfieAoWoq6CMinw4TkZTAhCN4NR9dRMwbtm3lNfjqWmgzCDNC2h30ut OceXpe8oltyN1MylTLeouo6mdTbOauyZ1wGFSUCILKrcHdYslD5gMdzNAZY4c7ggG+zAGIRIzq3bl zYntrPN9EUYYDJ7IPtdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohzhx-002FlX-8x; Mon, 10 Oct 2022 20:49:05 +0000 Received: from mail-am7eur03on2075.outbound.protection.outlook.com ([40.107.105.75] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohzhu-002FkS-88 for linux-arm-kernel@lists.infradead.org; Mon, 10 Oct 2022 20:49:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I2KpbApWShG2RHiLTtzZHU0+WRckxO9HhSEYZ6bIgz6nDMWlgHUfnbg/gH1xU9NxPJD6ySB4HvnKnu2uH9DMZCnONbFaf1QB/cPJg9v+gLnuclz45rN77jNK/1JUI6wkekME19suEy24LQZdmBmbeAPDf0d+4ngpxoHnNlVfuKewZEwaRRSAeiSsTC1PqTw8HOksWtiHw7FxVnJWOR94Qlb0gryJV1WbAeh/mqoURnWehKlzACARQKDW7GISUsY6dqq8F0kfBrJXXiWcI+OBfEypY8qsQQXDQo8xan4VnZX9Ebvxg7k5HV88SoKyyCkn8930d1chEhgUGrxtBgUo9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4ziL0ZJdG3/BSd2EePcpwNj1CvB27Ws5/zYaQ0SfMR0=; b=hueWPzpeljzxUz5YX6YH9SvRSjkk/ETGDP1OUz0EXm1v4qSCAFt22NSVZ2cVJHGY8e4aqWFigU+Dnkq51NkTUQ6/STConr9XC7ak59TIzbvplUosvPitxtPnTlBHyZRJsEhUnFj+JinJa4ghBQOophb0DKhu+Rd0zYrjeJ+F1VIuuIFb7+yQ9yZrjAwNCI9vNo9AHJIG3qH6x3vuFSCTJveszHE0YfegUtrrNmX/QYXlTtFWvPHUtKH5n5tY9VUO+WnmsIYE4yR/+MWpwP14KQfC+3Z3uHjkDmMovCQCJKP9SNJymMoEvLo3lgVn7IYjqRKzBAGkZQTvZWWO2bf4hQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4ziL0ZJdG3/BSd2EePcpwNj1CvB27Ws5/zYaQ0SfMR0=; b=JwRngmtCWFQoxpcq8SwgCBW6YME55kQqu0A/GfuUQBY8BSO2QKxnZf9mKwAWAIn+Oy9TQuqR4UrIEPEaby3rzs4e9n1ruvX8YvEQ5gYquMEhzFyplyxq1BP4niYR53gkcvSTbwn0kbfAd21wwX99F92CXeX3orqFMUawHnk6J6c= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) by PAXPR04MB8686.eurprd04.prod.outlook.com (2603:10a6:102:21d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Mon, 10 Oct 2022 20:48:59 +0000 Received: from PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::4d83:404:c74a:7563]) by PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::4d83:404:c74a:7563%5]) with mapi id 15.20.5709.015; Mon, 10 Oct 2022 20:48:58 +0000 From: Shenwei Wang To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Russell King , Andrew Lunn , Heiner Kallweit Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Shenwei Wang Subject: [PATCH v4 1/2] net: phylink: add mac_managed_pm in phylink_config structure Date: Mon, 10 Oct 2022 15:48:26 -0500 Message-Id: <20221010204827.153296-2-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221010204827.153296-1-shenwei.wang@nxp.com> References: <20221010204827.153296-1-shenwei.wang@nxp.com> X-ClientProxiedBy: BY5PR17CA0046.namprd17.prod.outlook.com (2603:10b6:a03:167::23) To PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9185:EE_|PAXPR04MB8686:EE_ X-MS-Office365-Filtering-Correlation-Id: fc4e12ba-dca9-4371-ccd4-08daab00dae1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0bdkiT9APHqdTfq701pizcwJvIh82wFS/XeUKVX4dAmSfSEQIf43JRRiLgo1j8GWGvRLZ9hW/eXXJjgtEi8xatMBKKRSjSEHNu7MwR1FS9ug+QC3MhA90VAys0220amteGmvkzqnU9mwVN5WwGyzHqDPZDSI3NmXdSgmTlBeFRHKFYNCDyKUNM42F8P+Y6qkG5qyjuynAqE+QXKVIajnwfF2ItWyc7fwvUy4PSvT0S5xxfaa/p8GWG1s1pSor038tnSiFrJvKv0zu64YEA6h3oKzX4b0r0l58Y9eueeRIOw6S6eNibCEPAgMUxr8BaYL5cwn9DXGQkQ2hgaj3uypqCLeIE0d4VAD6K4R0EJllIev/D1WmCjLkalLYZ1q+jMZQbHgTA6O30hjzkD/kKBhNwaRDUd/CZywfmjrLjpfZt6rD4qhgmXYZpNvVdjMGkdvp0lM/RuYtj0xc7dgfU1s4NuU77IRORwYkbBMKlb2he54Yj3ZTFc4n5BZV/0k6D/mHUn79k1ZEB8OLvo/9Tz32n9gxrQgzRzz7M8D4epDEkqTj/azz2rHtWGzDexg6GpVBQw3E+hrpHZFTZ0h+aB1hdvXulTpM2qXaTdPqGQQApDIRiv5a9x76EawrapjsmU20QmOSMB428uCPshoblycWhj0s35eFU8FOUDT9uZ2FmXhuLTN4z9vD/Nb3L2mdfGzjCePtsG61sfR/vNg1nigpM1s5TEuLz0jxo/d2D+aCqDY5fdjr8+pXOx1uDw4hLRhgRrWd9XrrqheDAVo80ZZlg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9185.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(396003)(366004)(136003)(346002)(376002)(451199015)(66476007)(36756003)(38100700002)(66556008)(38350700002)(4326008)(66946007)(316002)(86362001)(8676002)(54906003)(2906002)(7416002)(6512007)(41300700001)(44832011)(5660300002)(8936002)(110136005)(186003)(83380400001)(1076003)(6486002)(2616005)(6666004)(478600001)(55236004)(26005)(52116002)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bG/rXRBNuYMsOBH1JgCky1U0HH62/aBNW/r85hebB9yn0JAz2kABAmCoWSE7fDDZeeJt9qKqQq8RgTTcKNQAHVvoJH1yPT3gRidbvE6LLdSthur8qB9ZRRFmGTaiHKgUmqG942Y4ezc2QFbnXXDRMeu4PRds0db61COc+KtxNgVOxpoLarBdbebOtIjVkSfblQ8ZIRCfDbITO/MYsWPb30dNU0tKpfGZju3myMS1PWJwggv8IFws5PIBYNuusnqdGzjY0UGtbAINwwHmuYBS1051+lZMIv81JXDDpTzLxehlGln2UQSD0gOonn1SMBblpCK5SAs+IsxrdG3fXZe4aOrJE3tfolsNHuVWUQ4aEx3tDl8snVyYpXNB62qoq3oTJpvLDDaZlfzwRSrSn1YcUCXkSIo1cEEUuBh6+mtIT0POUQrhF4g3FVrBM0LafoB0PRKi94erDAgr69WZKJ6ugJtp8Rr1eoVQavfpc6M4G987UGGB80hTwt5Q+nGvjDMkaiz/2Dzu4cpwjI1XFZd9WvLAK9eyyWBRJ15kEa2vfCGFskJVTKNJZbDrlEk04NYAO8en4TzK+hC62SaZydkejVvqfzdFJdYIHRjLAEvsspTZNh3l5nahjb4ENqXabwTJ0r6XWqVDRTd+PTDw2C2yfEkq369WLe0r6Wg/JUQUzZ29ZZLvW8vXAW86B5sCmnEkuCjgRJapfZJmDYHnNCq2lvSTTCBve3Y8SuAIXsCKXHjYfmIPpsjEeXFkc5FUrwSbwcBtl5tdPO0w5h8IhyBPdjB01vkQsnQlxHN3Zhli2Mjq8U7esYeNlbtsU11+Wa0NodtIerDARtVcv22Q4QB4EUVAZUnwGWsx+0JWZsD+JNjzKpp353rG+QVHbd+tyKYK40vWhNfOE0uJ7RobVA+vYLbtBdDyWGoTZ3eMVx51I82DIyATf3kihJKgO+MR353yUcqjFFBnPKW/89g5XE72M8pI/vJ5HqpNI3k0aF+zjpzuA1jAwudPLHSC7+Zk3ePvEiumANDRDzzcQuaPfVj/uPpXTn/BaB6TiKHzAMMpYF3QYLPBkoCR9VsDWIW8PCySyMjHIxjrCj84gE1Rh+RFwhwrfh6tlHCKNs4UjYwt/91e8w5lk1Vc9PMVbvqg/64uB7CJ4qwy7Qwo+ufssgpyrh6YH5VwgY+uRfeQsjB+GPTPWmhI6vuG04jV4oTuV8ewE4ax9TNYC9mdG6BWjp4Sxoa9LbrrF+wpusUkP9KhAW37s8SatVmfQFilVwx8eh6hpEQQBc6Nl2hU/2q7w/OqteY9Q0QQcTbJa+w2Dxe3GafPUMV47XHcB0ERaajOwJgUvYSJaDq6yG4gcW6T3h/jK5e8aRua4E/ZwB+hwAEwAl9FfcjDniYjMQggNK+74IyffoY1hGhD+lrySUZawW3nbcpYvAagDbekct3WVKsyFbZQz8mchFi7pj5wMyCuA07VBnm0S+V8+lF9uvZpMjwoRgRUMBBnDIOmyELtqnFAolTTRTsYLHs8fthVJ3wsxqtB9E34tcThauF+wNeGC42uteL1PWQVJEaHDnBmzj6dUmNXBlpX31SiUcMjeUE4aGSn X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc4e12ba-dca9-4371-ccd4-08daab00dae1 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9185.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2022 20:48:58.8332 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d+LTVLEB5jCYuR23/kXHboGVwDFm3ZlX3Pm6tsAFFHG/HnPvO7akIJ6rFRdErAqkGn2xVEMQ+io+EUvZ0/EE7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8686 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221010_134902_310830_907A39A0 X-CRM114-Status: GOOD ( 14.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The recent commit 'commit 47ac7b2f6a1f ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")' requires the MAC driver explicitly tell the phy driver who is managing the PM, otherwise you will see warning during resume stage. Add a boolean property in the phylink_config structure so that the MAC driver can use it to tell the PHY driver if it wants to manage the PM. Signed-off-by: Shenwei Wang Reviewed-by: Russell King (Oracle) --- drivers/net/phy/phylink.c | 3 +++ include/linux/phylink.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index e9d62f9598f9..8d54bbe14b6a 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -1439,6 +1439,9 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy, if (phy_interrupt_is_valid(phy)) phy_request_interrupt(phy); + if (pl->config->mac_managed_pm) + phy->mac_managed_pm = true; + return 0; } diff --git a/include/linux/phylink.h b/include/linux/phylink.h index 6d06896fc20d..a3adf7fe7eaf 100644 --- a/include/linux/phylink.h +++ b/include/linux/phylink.h @@ -88,6 +88,7 @@ enum phylink_op_type { * (See commit 7cceb599d15d ("net: phylink: avoid mac_config calls") * @poll_fixed_state: if true, starts link_poll, * if MAC link is at %MLO_AN_FIXED mode. + * @mac_managed_pm: if true, indicate the MAC driver is responsible for PHY PM. * @ovr_an_inband: if true, override PCS to MLO_AN_INBAND * @get_fixed_state: callback to execute to determine the fixed link state, * if MAC link is at %MLO_AN_FIXED mode. @@ -100,6 +101,7 @@ struct phylink_config { enum phylink_op_type type; bool legacy_pre_march2020; bool poll_fixed_state; + bool mac_managed_pm; bool ovr_an_inband; void (*get_fixed_state)(struct phylink_config *config, struct phylink_link_state *state); From patchwork Mon Oct 10 20:48:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shenwei Wang X-Patchwork-Id: 13003259 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 28B62C433F5 for ; Mon, 10 Oct 2022 20:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=agpgFYA+mJOgj9mmIgCQnclRhptJWe5fSO9hw89a3gU=; b=YIsRxZLpC6NpwX AwJ/+4nPFR2tTDBPTgvfqD1ECphFoZ0bqeNOogxKm3xlBsqBfP12JJcOmL+V31e+rfSlRsE1/4PYq dHF19mwk0GYIjZw5O/7jkt4nHb9fo8fgPTgaxhy0hfGEmCqcWpB2FPgiLa2wmMI8/f7ggWa1HEqol vulPu2T8McrHY/Z8vyeuJC37orqRhKiLog/O5Ce+vKdTcSop60xvg41oki8gGtSSluzvOLs1F+slc 9dP3tvukHqpKLNGOUR0oWvLsJo3W2VpMUsV8HkKV3x+/5CqQlVBKcVh15PMoNeR992eltZlRQJzfP /bXrjB/rJtntWd3qXJ7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohziE-002Fp1-RU; Mon, 10 Oct 2022 20:49:23 +0000 Received: from mail-eopbgr70081.outbound.protection.outlook.com ([40.107.7.81] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohziB-002Fnq-Rf for linux-arm-kernel@lists.infradead.org; Mon, 10 Oct 2022 20:49:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UtH6cIj+IgTmMj2PkZja1t91PkB3vqqjSaFD3fgtuRaVk6OeTX57CU6wL90ICU7xjdmOOKb2oMvPokBRoHfXG7su4ztav/83EKrnW6vozY2o3eGSX+y09v2evpfhJcSFsR2YRKf0UQJleUaNgWpTF5Bvp80kXPGDSNFlbKpvLi6SpljC1P00TZfA7vu43bO9AZYYZfQ/OhBOXt9XgGNkgSiHCsQMEBVRoXevBC1Zl7eHxsy2eugzys1eXKxp4aLcAKkUp0B3nHNMi8PfD+DMeRyj3/kFvtt+vcd53hxNa8T9+hmyk+Cllh+Usv/sz9K6U+VMY28uIp5znBpqpq187Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CXbZEbsRu4n8mowJtawgrefzAQObySrKiO3WI8WyQT4=; b=l0J+ms5vh+Mc3iX018RXB6ksuaA1nlJ1mCLhzGC1ZrMlI2X7VAiwZVAvJOdt4WKNsmjBGagTMzc0XYM9A4eap86Owq1honTuFV8uMqAiF+5G8F7NmCwU8a2iqWyXOwWgG34276EzOgR0CG0gVM5a1DiaaugXLK68G6hZleY0Qox8ATiSSpG/p6y7ov7UkooeiVwyBxnQT5IhAVCRE8KnczV0yRgdJWWMpPtzeXy5rXC07KxVS5By+9od9Q30umGVxkrqtt3Xk/fccMq/jbgLD6x0bS5Xq+4DxuXXicBH5UQUxvIU/LU6SN+d+5QT6dZg9NXtKNLvXK1zjo3JjlbkXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CXbZEbsRu4n8mowJtawgrefzAQObySrKiO3WI8WyQT4=; b=OnBIOPTTO7SuqPd2ekYk4PPuq1pTBTzsUMQoCOSO04FRqA1l0e1LPVglw375cGhtwBz4nWl73wO2eb4IhyuMrTV5brceeemLJhx7W9vtnikF/K/Drj2BU240dlZgmkO1fSCBbSKM8aRCAlxDT6q7IRyCoYHFKepvFfWZ2RIYvMw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) by PAXPR04MB8686.eurprd04.prod.outlook.com (2603:10a6:102:21d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Mon, 10 Oct 2022 20:49:16 +0000 Received: from PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::4d83:404:c74a:7563]) by PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::4d83:404:c74a:7563%5]) with mapi id 15.20.5709.015; Mon, 10 Oct 2022 20:49:16 +0000 From: Shenwei Wang To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Russell King , Andrew Lunn , Heiner Kallweit Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Shenwei Wang Subject: [PATCH v4 2/2] net: stmmac: Enable mac_managed_pm phylink config Date: Mon, 10 Oct 2022 15:48:27 -0500 Message-Id: <20221010204827.153296-3-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221010204827.153296-1-shenwei.wang@nxp.com> References: <20221010204827.153296-1-shenwei.wang@nxp.com> X-ClientProxiedBy: BYAPR07CA0102.namprd07.prod.outlook.com (2603:10b6:a03:12b::43) To PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9185:EE_|PAXPR04MB8686:EE_ X-MS-Office365-Filtering-Correlation-Id: 0053159d-82e4-44db-50a6-08daab00e55d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: spnwz6jt1H4hDi1JohzBxFgDlvtsKEVM5ZsCOn7d6vW1dMUkYiHvE8ipnVPmXgafyw/Eb4+mrqDvnkBM5Oui6TqG9JqSm0wcPl6oGaSANzRO4ltMRkZ9O3aNNHuMq0HSVdoHYzhwKH6DTvRkxoZULS7qw/e/U+EYbV+3i7aEgbLErBN9KH5puOLH6hUEKgUtQnxs/pvm9Wz7be2g++kV4qkzBSNcKy9LMLzrKi0jq6Z0XS1X6MZI8+Ri5+7FdIwSd2XEoc8FHlBTk2hXOSo1bTF4Vd0M0dqDYqmJx5JKjqOyfjx/0HAz8sF5NXyFiBOt2iGtwnE2HiOOBnbFGh+X9RxDZLNypZ1brJIQVgzJAcMkTZUOny+/AV7jgC9W66oWBJKiiHk3ZHzHn5jm3/z/49dM3cuJbRFKCnVMpFXUwytYC7PG5zLcNtGTa7l86A4uM+Zjs/5zTJzhSBXWzkSCbutcuyk0sNh+EkB9M76EjSDRgYJlU603UiSmgNMJBvq6nsKMVosckz2YK7c9omOsSN0/rlY1KYF4RfU+RMWfQzLwA/QfhPMOhJEsv3fJ5Aa9VouBf1cC/ZEYlhn377JhhkIiFNY8ZD57cevhFw/tgItGsZ17AXCzgMSEq11QJo+vE9LQ+jEV4KspBDATDIJfDXNZvtFz/2M/OUkXsIhQXQVAY/sgkU/W1hiB8Yf+lPm/LAIIExgEwt4Kmu8htoO/WCxdwL5QxMvjAqTCe0KuDDCJM0NxqMhKxwjpamGyhnjryCo/XsHlSuI0svQJE9UlHQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9185.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(396003)(366004)(136003)(346002)(376002)(451199015)(66476007)(36756003)(38100700002)(66556008)(38350700002)(4326008)(66946007)(316002)(86362001)(8676002)(54906003)(2906002)(7416002)(6512007)(41300700001)(44832011)(4744005)(5660300002)(8936002)(110136005)(186003)(83380400001)(1076003)(6486002)(2616005)(6666004)(478600001)(55236004)(26005)(52116002)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lkjJEVMqMfxI2qeIrpx6lW+TCrNh1pFEnxvfa+frHJvPjDx7tEFS9Va48WIXYAwyRWJZeBTUKLIZH2nwww3BATahWcBKK47OPDXiZf3mdUpsQgn/97l2N6MoQEz4xjqS9xpa/OT7Lx4xdTh3wD7tO/ymmZ4K8qzkw7oL0g34QlVJdjgYraspnKei1U9cxMYVkdWZleEdc5k7B9xiRDNScc+e4E7KA761d98CyDMNdY7YemyQlO6nPR9eTUIQBjodScqx8k/dxRkfB3TPsHBzW2Uwv3QfHxFDjLLBTEv5KjH3LbHa5qhcgnQ098zD2w/OvGOIHokVXEkb+UsaKTBYQLzeT6DT7/tNPGnzRmv2+pBUnR7jWvK3OuoN/v91HhjUnW5WhpM87inDeqP4WNDX6+1d3SvJHHRFNKnVkzfFsRfHHCF71AO6enGmT9KdcGH+fHJkjSj9qt2YwCPFD5T7QAfwYvynlB2QehLbKziisJm1Ue0sdGsC6pzcd2NfRp9sYAwzHNWaSb5uDzb6jd5k4FPp2jSyktt0wlWtW60rAxww6Ls/1pJ5g4Qga5AObfXheXrzGTUePemvrEx7PgHwRhT6Wn0um6vvZD4obEhY0f5q/ZEtFcNMncvJYaruNKmUcDwlcAam4kAnckw6SlOftF5Uz1S2nKNLCcdGGtzXHs8S3vLKBGh7A8gLpAaXby6BnqntkMQrH2gffaboF/u9WHEXuv7s883K3ZYDMl4dXhCgjAPIlGUoqjwf1o/E6qmblJLZyAEHRgzT0Elm6D6N1wOdWLM72IiNNSxuHUmCbQ7Gb29xggQERxyxQU0YhER8V8/lxQLNqG7fhJVsYvYsGwfqpX9ga1EgJ1vcWkctkmzVm9qzqOmNkPJ/g/LjZ/TfayNE7nhjS0fDWKB0xpvNwng2EJaEzjd3/O+A2yCD1IRpkxE2ubjstkUWXwcKoHGQb9vs1liepV6VMxounpGLmQhwDuVapKeHrGRxHwnAgTDA0h7kDiDUbDcMA5gy4aVcfLh0VtmgwxiSYfA5IEoE8PO0IEhkkjvEOR/tTIaDsQPfpadiNTM4AXN38eDzAhnSB0c2YO6IVo4d+KMQ76ovmdqSb61XdHw65i8/JrV7DbKuVIpMFU6+LNtHzRTVw9WbiL3ErzWvXx35E2cwUEgOufaoJPaMUL4n2giQsTOlI1VIiMudjXtQgufJl9Qn5mtoCN3+DwY88YNUX5MMuMBEaeyVicqImmPC71cb7sSabFJJd26N2I/C38sBfIC8k/bwoWhU1xvT+5vSBN/ME5zW2xj1uIcpXN5usIjhmuT0ENZ6wxk81dO2mEBEiu3x6bWQkaJOTzRqLYtoVlHyhL14yXcb07m2crn66oNH4aJ5OUHYH6WI9iYK64qKYxXlyc9PsMtt1BgwSmguMf/pz64J0/GVGwMH1EcoehkM7kEiNc6kJyn3557ZbX3t6Dr0Kgy0ePjjF8PogpgzXc06hoWig7ntmVlZOuWHTkcQ1SjXzXmED4P+Y+TYYFmhAGQfTn9y+BXmb/Iabu+MpvvOPjet6Wrggma2Z1qNKjZRQDFwv4FiNM7gWKmg7KOU+JDxX087 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0053159d-82e4-44db-50a6-08daab00e55d X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9185.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2022 20:49:16.3575 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FuVkSyUIaijJlou//BhcDzLw7PxTNs7yXQHxdzpjoOIbyyLpI2UYSZDzrhsAcVjAROppjddi7lm/574l6Ry+5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8686 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221010_134919_905178_20CD323F X-CRM114-Status: GOOD ( 10.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Enable the mac_managed_pm configuration in the phylink_config structure to avoid the kernel warning during system resume. Signed-off-by: Shenwei Wang --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 8418e795cc21..537e8e61bb97 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1214,6 +1214,7 @@ static int stmmac_phy_setup(struct stmmac_priv *priv) if (priv->plat->tx_queues_to_use > 1) priv->phylink_config.mac_capabilities &= ~(MAC_10HD | MAC_100HD | MAC_1000HD); + priv->phylink_config.mac_managed_pm = true; phylink = phylink_create(&priv->phylink_config, fwnode, mode, &stmmac_phylink_mac_ops);