From patchwork Thu Oct 13 13:39:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shenwei Wang X-Patchwork-Id: 13006078 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 40870C4332F for ; Thu, 13 Oct 2022 13:54:15 +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=pq9MTrzqgoV0cbpPsCV8KFvIq0xI1GkvnvZ3bv1Qrx8=; b=46CzIksoK1AYo6 1kC9QjxI9dEum4/7PsN1o2/wSh5FIXyhyNFjF0irV8pm1ki5Zp8HLqaPeNo3QAGV7BGpFzrgBnL3k jprhAErdI5fBkFj9JfBLqV5MUK2yLQ1e/6MbaO+7yihTh8CZMIVQTjJ4Bs6aKTNiiKUUok47UM8N1 OGjQjxAlZSpJ3LKQu768lsLT2+EmhterYbPBdu6Y2K5y/zPjBGLK9Sj77UzR+hpm9oQbb1nrBAhTC dNem0j8Nbto5a05JwA5HbZbotcDsXG4m3kHSViDuleqksohoHL+55ssHuRI9UgycLgJSs6q0zuqr8 0PfvCeugAO26Le0k8KHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oiydh-00C1Jp-Uc; Thu, 13 Oct 2022 13:52:47 +0000 Received: from mail-am0eur02on2062.outbound.protection.outlook.com ([40.107.247.62] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oiyR6-00Bvcz-UE for linux-arm-kernel@lists.infradead.org; Thu, 13 Oct 2022 13:39:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XSMleEuSu1qH8zcc6FOU2d3qCvJrC5HC4A0UHPQRVejvAesXB+ue3xtH4znPqI0od1+PdXF7k0DWQcvMPN/ftLkrmFITsmnGS7bzpGu87tsm94dAPstlTRXI0jEQDirJMaptHWT6PiaAfvi1gYM2h2zuLT49tCGbo+vtjXw/vvE4mPhvmg1NJpefZhL7LG+wA7dEn7SmszRtWtlcNAp8vd7DyaTxxVexSV97cOo6lxwgkdK0Rck+s2UBzubWYr/yQY7g3/CzDxqIaInCCk30qJfl2T/+RmkjBugQaAZ81vnkbQoprfYDkDQeYie8AVSLU2sObfO3bRoSeHBD0eEuzQ== 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=Up+HCRFI/ixMfUUTiBA4idXYXTMRKvEGWADMTLPGyHI=; b=USc23n5fUNz3hwVaO4KGMoiJcO9Lm5BZ0qKKHiVMqlmqsHBWwyQ6kHLv14uCRWQiwL0GPmSH5qtK4tyMN6/NU7Xx7glc0/o+u/XQYEhohWIZVkbW2WLQgGjNuT4gBq+nfFLph0BvWqRGnWYfnx1KCMNGZoemKfi9xLTvwpOQR4uQ4wb65Dy6GAdp3MM5dYYo1euMo7+7cYsU4r76Ctld3B3Jtrz+1sXudMSE9igb1vleNU0Y/b8t5in+JiefMeZsVYwcEDo8yRg6/pL5PgckRg24jHTjwpW4bEUtX1SBVVRgllZyaE1+A2QUHw0IVgD0nCSA3RgVDdjzP+7KEmkH4w== 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=Up+HCRFI/ixMfUUTiBA4idXYXTMRKvEGWADMTLPGyHI=; b=C8l0RbbR1FwFK1XKzpzoYkr0Kvoy1Vve06db3Zxp9Djw2r6gJvwau8wPgptsjOb7csTIZg3vIlcr1P7h1la7qOWLdi1JXOZRum4avpn3GC+c7kCQXhWG9Fp4AR4VMP3aUEjLo/eVsbDYdHVqJz/f9V9fl5xYVQ1t2u8YqlIdqSc= 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 AM7PR04MB7141.eurprd04.prod.outlook.com (2603:10a6:20b:11d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Thu, 13 Oct 2022 13:39:40 +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; Thu, 13 Oct 2022 13:39:40 +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 , Russell King Subject: [PATCH v5 1/2] net: phylink: add mac_managed_pm in phylink_config structure Date: Thu, 13 Oct 2022 08:39:03 -0500 Message-Id: <20221013133904.978802-2-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221013133904.978802-1-shenwei.wang@nxp.com> References: <20221013133904.978802-1-shenwei.wang@nxp.com> X-ClientProxiedBy: SJ0PR05CA0069.namprd05.prod.outlook.com (2603:10b6:a03:332::14) To PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9185:EE_|AM7PR04MB7141:EE_ X-MS-Office365-Filtering-Correlation-Id: a1705d8c-971a-4c09-cec4-08daad2060f1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VNVa8WcocWRPCeqBWkhGNdb592fLxvSmpAjSeLg28pC7EaTuZ2rio7kfAxGClHBtdudfVYKZ4gUn4VhS0aGSrX0yVmS4ze5gsYj/u4GCf3Nuv7IUWzlt6t/wf3CSZ8A/E8GU104LkRFsDKkaHc6UgDjxxKMj63pC/Pr1RDnESwk9zLwQuowwaID3xUSAW2UHvkebc5gSZDCa0AuwjosfdQfL+W33qqbD+ayEbPbt7qDMyAE4aqoAjJDEvDnTQ6QlgdLMw2HTbqYvhBU6+QgbivvJ5fnr4pqpo5gOCfoDULcNLI7fFoMsxbJY0ppXQ5c1cLgiCPIho04sqwJAON5RfKkdkGP7RMGT7zz1cN+519FumcPVIJLYe542lRXernYt0JYh3rQ4riEEhuTKcQs2SHbacUMTZBfhrVLnfEFcf8b9Imyx+8mw+1mNILqOdqRpxX/6d0QrMqXzi72hKYZch8jxJiyZuNhve1LIMK7gzM8fAXSnReJk8NyFlucXZvU3axsIe3jWbSrzZdDIzoa3CpK0CTCAsKEfcXq0ABu+iPtQxuipfn+XOp5SBw2x6acHd7IfaiNBNFX0KBnGV8TKUPrw2z/Q4akxf1nRrpXLk4m6IfsS6wrA9QF2ybCeVYiyw0PDZfAs3cLcN9x9CcQH+FhQ1ikVzYHRevIgu47M0hmMpV45CP/9cMDFIDwP9hIlat4NNAHBsVK7YjAi5RlD2H4/WqMvAs7kGCyxhN9VoHVAW0zbSdPEb5BG6h0SsU7Szo/OpdZUq3oxrzjxmByyKQ== 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)(366004)(39860400002)(346002)(376002)(136003)(396003)(451199015)(6486002)(478600001)(316002)(110136005)(54906003)(6666004)(8676002)(41300700001)(66946007)(66556008)(66476007)(6506007)(52116002)(5660300002)(26005)(6512007)(55236004)(8936002)(4326008)(36756003)(7416002)(44832011)(86362001)(1076003)(186003)(83380400001)(2616005)(2906002)(38350700002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0KI64rEG5ArIEP9qcaRJfsAqSmQk8J39HvUgXcsxAA0bpWZ9NAz5wV/0v1x+AiKni6kVb9Exz25nTsTzRe9B7wbb5oT0ayqjkuECu0PA7eNRE737g6BYM/5TWxRNi6G3WVvd2n1m31wZ22AwSObZZ6UhvtvpnBLP4cFKrNBFE/Mhu9hlef3S1+xEhNkPk9Yyal0Kt5baaOfZ9alN58a6IEXFiKzDoa1B6bHAMAXzHKie14Ohz2Jt/1X0Gbj8UvCepX/6+2LJat+uTIl+OTNgpKtj9m8QBXSYvpAfQzVnA6xLiZoERtdp0k3Fn6IX9SRSsK27cIXWxcwX+trDr0opVV+JaERKXxn86ERAJG5TQXvigFeifePjl0vlozrWU5aSVa2tWn8xtqlU1UmrhhbQ0yCuOA2WM9VrNuoloa3rgcCFoWog0rqMl3Hf8YntGyYHuotlGNr5iBVDVaygl3mvSsARpiaY1vEUZknqdnzL7wGuvNGuWIzi8xaOTf24tBq63bOZoTH4EU4OVEy4Icru6+Adg4ztl55ixbkWppSf21tf7QzZ7HUFH4pLTKU658+/zAjiRWXfhJBR63B1Spnj0Cu72y6j5WqvkUg/0e8pNW9waYIWBus5YVgMxoCJa8pm6Qr9r3/fzzdlfqg2cO9izMrPSKWxr1JyOyXnxfx7ZIW2K3Ibs5ECXNEXbh907m0AHIkQzaukCQeMWLAplFRYqCe9BFiIopgMWW2OsUWk8FjipAelW/21Xl+fq5uOM9YZKPPIwQGshiMcqTa9mnV+MilTTCYhgcpT1WPhDt83dZIb8i8265jPWyXSmh+I8iKJxU/33ryGIVjIXbPbfz8RBXkB2a++AHEMJmLYZCHHAO8Tk8byPBu3AWJ1dCyyomhJKKaYTXLwN396au+pCgi2Qe5Zo1nC6/Va60/nGuMnvIldNaDiocufTGjvM5cVbzMhONV1N8xLjY1SCR9LAY7pxlxoZkooMGUG8mFGJw9UxqEWhuA0umA/og3DzfKAHMr7yc13mcwuXXRUEr6GXUDbB/imDNJyMcnOkZU3Mbmv43wgMfi1DnkiNigO8VZ7KoS5IrRWzrkiIiZzi2MssVOL19ZpqA2jIiyLvSgGNI1rPZerCdwtgXQC102dn0tsZ9WLzu9vZ82RvhKX0XYViHrRKBCirBDOHIQ8ECQwQVRQE2HwQAnLfBMW5GWqnosC0JnfSzxfU/af5qtUMa72nCsEsBjXwF//+DH674u26jZtOAGT/9tnseUXEIhxPim+1kiZGSrKzbEWd359t5mR510TvVQbJUg2qB70qzq2FxuKbtxMXyI11ehoVdJ2Krs2Fd3g/Z6gHenm6Tdh87wtKnjxbA2YIWzQTaNL4UCxNPzF8F7kz8OcjRQZcWtYtPmeREayxobJG212JJjYqehY4t1j8llnCrMQBcsHBIdlyJU7S6yFKaMLsGRygNvC4n6aMnVHZtq3oSDtlF3kcYFO+0YklhoJGVt3qWG+ZA+RFrK15H7xBLV7pGnCo8RB5mDgeA/dQjVdTUmoMQMzm4IwqVMCcKcf/iRc/vm4aBCqBSFmakFQz7eMNM8R6eSTYiSGdwAS X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1705d8c-971a-4c09-cec4-08daad2060f1 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9185.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2022 13:39:40.5552 (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: FSK+coDnv7nU90+4AtNGFRYUHJpjuVCEGP1chxHL8gMO3t8G0SKR2uz3JgUyZBbNZYdi8KBMmwuaFNUWVSGctQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB7141 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221013_063945_028115_8EFC7D72 X-CRM114-Status: GOOD ( 13.98 ) 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. 'Fixes: 47ac7b2f6a1f ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")' Signed-off-by: Shenwei Wang Reviewed-by: Russell King (Oracle) Acked-by: Florian Fainelli --- drivers/net/phy/phylink.c | 3 +++ include/linux/phylink.h | 2 ++ 2 files changed, 5 insertions(+) -- 2.34.1 diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 75464df191ef..6547b6cc6cbe 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -1661,6 +1661,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 664dd409feb9..3f01ac8017e0 100644 --- a/include/linux/phylink.h +++ b/include/linux/phylink.h @@ -122,6 +122,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. @@ -134,6 +135,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 Thu Oct 13 13:39:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shenwei Wang X-Patchwork-Id: 13006079 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 5A5B0C4332F for ; Thu, 13 Oct 2022 13:55:24 +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=vDBZwLD7kuGdEa4RRv/jcTNWV4eOnAUUkCwmrWVgH3k=; b=psS8RS2aQJC2dw HXdo7SWdS7l7A+sAA03VtDUdn+gcSLwQwoZX4tP2Hioy1JyHDiF+0SenkV8aeB1wPzcbz4GFrFPOc j569IhaWJTRsFIjYzedniCkx2GsCX1wSHqMk7a1B6IweD77uuEYFLc8WZ7jsyc48kOJrxklJrQgfP YRfkgnPsyP2ybn2+Ow4O9ycdK15aCEQAOQD80w40mV5zjI5ARgsJZoIg/K02ib34oaC70nPFTwg/u 0HIy6oMy+odK+0mIoqXFmK1IwbMWCozjxXTJOjd2l5breJk/r/3dvgfQsoa381dGvJE4/RnDCrGBn wzRimG7yHDkbgjw+fbDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oiyec-00C1d9-A1; Thu, 13 Oct 2022 13:53:43 +0000 Received: from mail-am0eur02on2062.outbound.protection.outlook.com ([40.107.247.62] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oiyRH-00Bvhn-S8 for linux-arm-kernel@lists.infradead.org; Thu, 13 Oct 2022 13:39:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oPMgTb0Z7iHcB66Jwxar3ESVenzqdWMq54PQ48Ruly2MbJnIw9lnGDIGyN6nVwex3aUWfx1Mm9k01MAFz+iMki/U/F+HPRWI2NDMTkzZqQOU7BdxSImWwqgZM2ir0d9zQRkEf7tLEnRW9hM4mUSWXTBo0QfZBlTbJwIA3SMPI2Xi13Uw2clGUj0Uki15CbQg9UTqUiLzpci28Zu/KuKFXxL7YWEri4aAM27RzAAUlcTFRYN2DI/2ShvhFYExnFtI4EYT+8HCwAjK9BzQTp8V8CKcbHrq0htKpV1Id2egrSOfsl799vSFKUQAvOdZd6BLQiKCIKESmDD+qzyIVulh2w== 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=FH8r14OM/hw+NJpMxsfRSvMp2Z+Iiw6xbFrTZpBbZ20=; b=JI3lWMCggxclrKYHv9GXIXM6mg0xsRSMkSAuQAFpK17+myTOS5z9kgUfkrAtoGyHyF1pyQXsLOIpD8nBvQ2IhEN5YftDyNuxdSt8sK2OEHGs+pNn8DX/r/If8gPEqCLx8ACFP/tKxBUemRkdic3f+S14Jl71z5G9yzsEnTivyBeKFaLEcC5xB+Z2N2Pc+mdMKqwgNVTTWmgBVWFc5djYuscBcyAH03Zz93UB+Bxeqd2qHFDWylfINa6u1hRe1Vxt3HuLc0NQofwnKDItImHwqYkVaPzcJNkndMEWhfAvkOA4CNb88VUMyf9yzsAFg1k39/+LamLiJUxbn73GgS11Gw== 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=FH8r14OM/hw+NJpMxsfRSvMp2Z+Iiw6xbFrTZpBbZ20=; b=fvrwW0vhc66A3CQR8ZZaTlteP1cmbfOTamgUyUaqJQ1DneGO40cKANCujEO7QLWBD0Bgjem4qzwW0sXPFEc4gU2vpj7NYaFeAzgw2C6dnNHH2+QuB91+DuHmLhNy8IE8tQ6Ks8Dpc1n+CdnZETqjmKnNa8WWD5FrGRKuV63r+dk= 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 AM7PR04MB7141.eurprd04.prod.outlook.com (2603:10a6:20b:11d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Thu, 13 Oct 2022 13:39:53 +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; Thu, 13 Oct 2022 13:39:53 +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 v5 2/2] net: stmmac: Enable mac_managed_pm phylink config Date: Thu, 13 Oct 2022 08:39:04 -0500 Message-Id: <20221013133904.978802-3-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221013133904.978802-1-shenwei.wang@nxp.com> References: <20221013133904.978802-1-shenwei.wang@nxp.com> X-ClientProxiedBy: BYAPR11CA0087.namprd11.prod.outlook.com (2603:10b6:a03:f4::28) To PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9185:EE_|AM7PR04MB7141:EE_ X-MS-Office365-Filtering-Correlation-Id: 20e2a5b8-3ec9-48f8-3672-08daad20684b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2SeIp2WO1doc+N7yB6hw+pcq6Xzo0jdpTj1Zk4+ZukuHl4Gxs06kBqvXCdmu4i1ngDTkufOPwCUFHDcXA+slVN1Twr1PMvp8IJq7Xtpf0irDzQ+YDP+Oz0TYGRtyla3VMJhQY/eiCPHDUM0c55xtqjWMEZMU2wiir7HMuGwoIGKXEn/AwXfXSZ5nptG9+FwKMX6e/XQyPfp/eo+/Kyji/vqZ2hG8lSKGJdj4N/nOgDbM3QJVHW0OVxalizTDJQGv2nIlh7DCTCmQ67kuOKB6EJDKhfCrxffHeI5bAYcbaFR7XsJcvQaKn9RBhJJTo9MH8A9zZ3i2OJMpldLSZbaYUFe/Tr8C2HIThI3dZChlhFLNURW13ng83h+P6mYVWuTL0dH3miarhrkjLhiiQvEQeGyONl0Ur3nJup2ZzPPWFGIb9n+f02rs/uho3xrvF07fEnq0PQNsTbPwIWfqlWXCKXvdn9ASdlTmGGhqWpBiTlB4/NXnohDjfFOK9mjy7Vzk4RVH5dqYO/FdLW2MbVhHy46Gap8TfQl4PvUDQcv4sUros714HhMv4EmJPVth+49UoNgzVQHmDYcUDoHJHU4ob3xo9XhQwjK5JWZYP6SpQ8iT6jOrKHTWeDRzwd24fJt/RCwcUJAoQ6BRTuxSv3YmFtHtSPEbPv5Dj07miHQaA7vlsIxpfktVshOoRMUWc0NA3yjY6yKqPyC5T440t32MLu1HBTvS3My1DGeE/DTThGnCx2GxJgw9Lj7KQNKUKmY2UWSz1cT3rjJyYsM1xFSL3w== 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)(366004)(39860400002)(346002)(376002)(136003)(396003)(451199015)(6486002)(478600001)(4744005)(316002)(110136005)(54906003)(6666004)(8676002)(41300700001)(66946007)(66556008)(66476007)(6506007)(52116002)(5660300002)(26005)(6512007)(55236004)(8936002)(4326008)(36756003)(7416002)(44832011)(86362001)(1076003)(186003)(83380400001)(2616005)(2906002)(38350700002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: F7GcmMCTy7qNqcef8NCA2av8veuDr27ytk7ijZ++SMMKODAK5jA3ZiAqw/eGpcdhYcghIfULqUVCJUmg+KvmKlnALb4JPqQfDrI17qoIei3ZuRBAXHkMslg6DnR/thE+ZHY4Kv9fvJyi5reS4dF7q7zBDTWuQgJZsg5CE1Fzv/RMicT+1yQn5p2CynLtwsbsJSEvXR5nBEQ+QSZph/mf21lTTcamd2lA9JmDWb0K8Z70UeSFhYQMaLhVTkD3oDZupMzsUFPH0XOMdxM5czHz/MTsAz6+JEr8dm7iIuVBbXHfqNpOnC+rmuJfWvkKvgJYB731ZhGmvW8ZmYxnJuBffc2UScXkhFt/9RWsPbA6KC3RbBFP5PoeWph2We/vCoka2oHIyKLxXOd1S5xyPXVElOwSnknbMTORhR7MdtL5lKGeI+NzkUNb/9wFKE/0Nmvu7T5NliqZ3MrEo79SLn/a3wbkX5xff5e/bnkzYD55wvUMvSXb7HCeO5UgCtnS0tVBpxBH6+ZIf294m95GdH87CsyII+D8TbdqvlzIcg6RlMpGQZUYziMdqkF/TW6AbSF5qdmJkc3Qdd1u1ceTE1fL4Vy5BabFRMMhN7lT9LmU/Bi38/Vyu3atRRRjTbnd1ViyfDa2ARFOiynfpAhqYiDjYNGDL0Lx2+4cRthAFq0ZpVghQQEFfCoVEu57KDYQJ29SzUP5QxrY6wimGtJciRv6532ArCkgjAPgtLg3y88M6F0fMrmb+F0WMnhWAfM1/GMFNW+NseUFFLje/RInbRnv45hkHfhR5Mo4QyJHiZBDe88oOtMsvByGVcN1cYWyZY+XRE4C/nKMkEN63E4ZuQCDuodrH3HTVHBNk+2Ql/fJibdTTFBAo9DSVaapDKoYgapkG3HopQVBgp52iFDHqk6/eA5m1XaX/g8xFSNg0TyEfyp9BPklbgF11VQHujPD//rUL+rO5d0IZkzYrBlNvkZmi3ucGR2hf0SltXiSHBdCdZA3dshul+MWFOGcyzzyV2oOE2CNuzKMOJm14Jpv4rYL/BtUGrC9ma41TddO161o83BIGHV3nZcOOGlwX5uaZKA8qeSRIlr+pWBotEJ7eLcxAhA6OU4BH6SNSt12y0rn/zncsff7Vms4AWlUaakvuHvgcB5URF2+YfRYiC9FLiyLuu2cb0N67H80u6q25+tufz4EXc/6YGsefpOzcpw5L+fz5uTHHVrNp5cO/ANt42sARyO581b7ODZlRtbbC2nyRQwl3XhknBgyXyus5d69cdhOB5Lrfp4vmr+C6lChvTscPOFsrIdymV2HRLZx3FLq7uKtbMU9KKIaHrIkdii/XsdI4WV8DJcZkK919/A5bE+IYhO4+BovZV1SmhjC9bvlPrIbITnsPTA4USEzRw3uMw//B9dmIS6Bjl51YFnTKumPznJUNI1HJVs749J6Ts7WueD6dXrGMRS+e8NXznlERv7c3VeKjjXuHnEAfNMds0lWl36ZMeBfD6pY+Cl14300rWUB+lTXUhdyER8RaaQn47cZ8eNeUMJesj5vIwJLFCuEOzsJG7rPhln+YMkYMGsbC8gpuN26u/+Tu4g4pBIGzWF8 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 20e2a5b8-3ec9-48f8-3672-08daad20684b X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9185.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2022 13:39:53.3087 (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: 1fHfTCn3RhsOWsBJVpJekV3f9VvNoWjFdNhXwlLwZHBHZ1LPL/bS36iifdnUuAW5h9O/U9P6VADwyA356jhUlg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB7141 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221013_063955_977069_349BE0C7 X-CRM114-Status: UNSURE ( 9.66 ) X-CRM114-Notice: Please train this message. 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. 'Fixes: 47ac7b2f6a1f ("net: phy: Warn about incorrect mdio_bus_phy_resume() state")' Signed-off-by: Shenwei Wang Acked-by: Florian Fainelli --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + 1 file changed, 1 insertion(+) -- 2.34.1 diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 65c96773c6d2..8273e6a175c8 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);