From patchwork Fri Oct 14 14:47:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shenwei Wang X-Patchwork-Id: 13007072 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 1025AC43217 for ; Fri, 14 Oct 2022 14:49:10 +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=ZXYmRsbPomiGadi1T9foWR0XvD6LeN5fQDtV79Lhwos=; b=DxSp+dT3FpTdFO EdbWLSzgLvLC7ztaiJoPbYNfLFAgQWNuapKm+qz6/Qt8KkqPC8EZ7z/kV/ihSjFQv8d4sFbTUaARV LvNFPXjuAcmLSnm2vaNdzL79/UQ7QA/hss0q1xZ78xAhZonF/r/gIFVx1CKPaz/+VgTq6i9QOf4AI a7cZQU54a2A+j8PAtWHqqW6FXJpRNzjodlHYgM0gdzBOjbu0mPyDumvdykwGbe+1jKNnRjoNx5UZQ Rw50ypoMozePMdiBwR2pZ0v+2EOndIfj2zMNfuVeiCfsvTjeWOfrmLukMc86D1g0rujdYu0KOLuM+ a1ZZHX6O/aBARZl/rybg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojLyn-00F4GV-Qg; Fri, 14 Oct 2022 14:48:06 +0000 Received: from mail-vi1eur05on2062.outbound.protection.outlook.com ([40.107.21.62] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojLyk-00F4FZ-06 for linux-arm-kernel@lists.infradead.org; Fri, 14 Oct 2022 14:48:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M0nU+LJ5GbnHjFj9GJ87wdEVB4CmPP78MBM38YK3D0rywB+OjprnMr2UIvin2M2WZXUmcm5j475JU6xLkOqG1xr9ThCTZp55e+yxbGDyyBw86UmEyi4zPucG97y4U/DaSkyAwH4IVt/NKgM1AbLn5H+fEX2H6DO6JEJgbK5oC+e+1IW+ZbUln7+f5tlw1l1/vJdRmuUGUyCrBJZrQZSu0wSgpxglCQtUgqGiOWUnniNYAQVj9m7kkF1PLfUBxQhXft/TEjm+pEnTgpKAb/EwnXVlmgvMNWYYPvsH12q1pxC4IfX6G5rpzqdSLcFjvBOfk85MQnwhTIOqiSGlmzBDPQ== 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=zXpqBtyPNuoWVfZalO0ZM7IaWoccbLHn57xW+ra1RTM=; b=OsLEEgr42HVayvLvJPLDeIoCavCy0zTZ+kM5ZzOUPMwwV87F5ACPQm0ErS/RKME5CrUgb9suapieewxZMJBQtOO9QghdwAE9ItfeyNaWD2Cn65DLxTbaEi/XwSG0UAKQv55j1kuZA2LPn0Svg+OZjNvVGkwYi+EIqADNbTjiko8Tnm00n9lK5LslNZRFGNqyq4hH22tEZk3dJuDAJhJAt7ic4eIfW3DK9MFq4GeF56EIzWESF2NMJzFSJRXVRBWyrFKXfbgl/CEuHsmNVHYqkmAUc5MYZbwoaf98vpGHf62VuSI0xZNrGX77rvXvA0/iQFTVxcYvWPjwRUaqjJiq5A== 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=zXpqBtyPNuoWVfZalO0ZM7IaWoccbLHn57xW+ra1RTM=; b=ACpHDnDZVaYJdlGuwCT/3HgEw+LdCMqc3LTjL/OV39LRJ/N79HbCZyj7xRnRWSW7OhuRHB6yY9Nt7/ZgPyjT3J+Du8eq106UID08ts9Jz2Ra1UcZCwCO8i8BSqQ8zFyY28u/kxWFtr9uS/KHd6tZ3/uR/vu5JgwBRUfupntWfwY= 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 GV1PR04MB9133.eurprd04.prod.outlook.com (2603:10a6:150:24::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Fri, 14 Oct 2022 14:47:57 +0000 Received: from PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::4150:173b:56ec:dc6c]) by PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::4150:173b:56ec:dc6c%7]) with mapi id 15.20.5723.029; Fri, 14 Oct 2022 14:47:57 +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 , Florian Fainelli , 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 NET v6 1/2] net: phylink: add mac_managed_pm in phylink_config structure Date: Fri, 14 Oct 2022 09:47:28 -0500 Message-Id: <20221014144729.1159257-2-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221014144729.1159257-1-shenwei.wang@nxp.com> References: <20221014144729.1159257-1-shenwei.wang@nxp.com> X-ClientProxiedBy: SJ0PR13CA0125.namprd13.prod.outlook.com (2603:10b6:a03:2c6::10) To PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9185:EE_|GV1PR04MB9133:EE_ X-MS-Office365-Filtering-Correlation-Id: a2d8a2fb-7104-4ed2-dfb6-08daadf31487 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ArFnG+xxmzn1U13YpkzLJmUQsRhrZYDZWX5JXurAaZiCwGy1vFwIiNGI1MLBM0oAimfbW/u5vMDEWt6cdYvOn5mHCP5I+IbXdry1tHNYjIxRccWWaAsMosYJ6plXDN0/K9W9Gs9b3+iM3UDZBGf4w9bzcw4lxoJODTSdOENHgDEUYYhAN1w4uX/Xsc1VHF8UNIVpMC2kvHru2lRU1H1ulSrlvI6FVv2l7I9uZbvRRUNfTnMschtG11uWBMnJaarTV78bu28NRUtfs/WeqEmeQWWVqrQPNJt432SUGnjODaCTKV30N3h7zXzS+LmLrLUPe4VfamTeco39D4QWF9b1FbEMbgEI+Ya/9eewQfX/5S30NCtLbRF0ws5gJx0nWfZwlU1+sj+xW7lF1J4/c4w8VRdXt9NsaJzQv0hV1ZNChppFhrjfm+LszQ8Fbktaz8rFLMmOEaPQpLQfE2/htJFCEExkGaCferoTV7VrQxPEqC94u4ekszki7kFSyPOWCNyZ5HQzNmTKYbp7My3wCqrk++AVyrwSe6+djb9KSWOBzDQs1CYC0dGVIRZNkhGnV8m8wWA2Id9yC5j5sJjuwXez7tkPUSmuOMQrdId28za1MHMxAtSffz0q1oeJ2UlRaY1mk8El47wFFBdgRYIP8aqcurYrtGtWVBDCb352cObMOdWTcyYmX5NcKdynT4z9Ow5O7Va9XbSmIGREx64+y0fC6+pgyDurHjuwFVm/a+m5kF3oWhN954aQIFJAeEKBNk3M30BH21kC05YTTEYs+t1TSw== 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)(346002)(376002)(39860400002)(136003)(366004)(396003)(451199015)(5660300002)(36756003)(8676002)(54906003)(41300700001)(6666004)(6486002)(86362001)(4326008)(44832011)(316002)(66556008)(66476007)(66946007)(8936002)(186003)(26005)(6512007)(38100700002)(7416002)(52116002)(38350700002)(2616005)(55236004)(110136005)(1076003)(6506007)(2906002)(478600001)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: T91B7owAX3Y2QVRPXMC+ZNgpnSRnLOzwa54sjGlz5dx6eGw8Qn8CR9xtYhuRw7X1Iy0J/EHrsogqbdt591QHqrHSZj9Swl83VPwVnuCMndQdZZZoafc+DKNP1hpRie65LSioMCToZAa51KAge2TpHGQFJDeqaORl7zCat0q9MXZYZ06aSl4gaxybiIDImCR7BHLVqqNETxzie2kcbEBBpMCFYP78sNKswRBUk+P2kazZokCzD61p8ijholEEmaWTEkEG2T8qQ3SnSxtpqNt32iaNHLjuZ+tYIcC9Pt8ycxO0qdUHl8yAWpXoaxnuXnbXVUmuZBLvfkS587MljZfCpexb16tIWifa/VwXcFYcERqel6LWmj7xp8NR8ndXXC/pZvqxNhdqHockFVC66hMqPQ5p0ca+FXZh94P482DhW8I96nG4gkIe+nJwYok5xJkFEfN0IuGUa8QJvgkPkoChfGDe4HNVM3STwZZ7j29pDQ4lUyJhVXgS11zwPBQvb3sV3IDmck6cb7moOH2HkeQgqI5y1Mx7KQijwelSAOUI1JHMcUhszWL/QY6mD3nN/9U4U5dhXnn8H6HWyHEi7px/fCJrN5RBEKshjuKyeE+Dqd44cCQzSnL8+FGBXQIMcQo6N2PlYL4bRuxh/km9hqajKDf6y6TEhjcHu+9A1c9QdF84As2xk/UjCQ+ljHLKhvw56is8EJObnUh4U7QQ29Y9T1LEjFlfLSUnB5wgOkGSrO82Mo7XOzgbN8tPcP813heZWPI7xSgA6hFyYGsYiq7yQLkjpYmY5L2c+LeBTXxMOlL/xc8woRDl3E8/6ILncpH9n6j6Y3qcWniitU2x2NJKw2cj6lfsi+gs5EZKIYXYeIvFMh4GJEHGbns8FCR2KR4Yv1Akavf905FLfClAlq17jHH4Lmvlt9c2fYUj9ZLd+rMBQxef7nR/ZpE++y3sCnvi9+4aojrg24lnnyi6I3fzFveGxQTBJzeK0TcSk6phrjRl/D8vSmuFvhGVF4NIHXZxPSVz3KPV1SrKjUGJfCfbRQSBTuSymlExpiYi1wZz4jL777Jc7UdjVR9W1vTDQN8QorJj64GJw9HdDPmIVPC+uLU3C4uXSpK4PjpI0J50fyllnr5OpumO824M5IRRdfQ5RK8LPVHTOqDUlLEbMVwzMNiWgFhSXJQscheyyX9bVxZ0XD86UOk74sthCKBxInKxmnWO2uVkCacyDOF9cMAOf/+39kG1KynN8xB6fLBjRJsdFn5jE8sg4H40Wuyr972ct3BbSdaOjFHSHuv1aok4mM2fMhP1vt6dNH2wSsk1+1FFbIfSdvwIm+RkBC/M6EA+BNrZ7ogbDlB/FdVCMDkKRmd5lVp1Y/qVdI7cmCpb/qkqhzX1A6t09vgZ9XexrjxBtsr7eySQKyw3hiDmp/Jpz1v4tCPyexyg+U1vlyx+CRqQOmUI+BRye/Hb1kwRc28IqE8wwYwBeDh8hjwlVvxsnI8ysy/MV67QDku63fAHIdXOlpZBD+pFHvY1sUzgXDB92VUTY79jo8A2AdnEcF7saV5o2qBtzJlczseQ4rPsLb+6rvTiOXc43mrCa2V0XpZx X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2d8a2fb-7104-4ed2-dfb6-08daadf31487 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9185.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2022 14:47:57.5885 (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: sRt/rQgqQ3hWza6ODCZJqPnpymOuQrk1gfKtcSuKPU/S0oOpOHt+IB2DkhDIsKmDcTaD+V7VC0n3wQjDWRFyYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9133 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221014_074802_062928_5C80CB10 X-CRM114-Status: GOOD ( 14.03 ) 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 744d23c71af3 ("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: 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state") Signed-off-by: Shenwei Wang Acked-by: Florian Fainelli 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 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 Fri Oct 14 14:47:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shenwei Wang X-Patchwork-Id: 13007073 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 A7A92C4332F for ; Fri, 14 Oct 2022 14:49:18 +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=ByX0uMkB8ms38Lc5wXhLzpJm+ato23AgAsKtVQR7M4k=; b=3qSOljcx3Tb3dQ Fg9JdwokXZ4Ingoqx/bLLs8BzNVVmhtGpo8bUyEIR1Cxn5Wio2yRUFAvCuG361dzIaFcp/uV8Mqdb G/ktYukfJegcMN4y6Bf5FcnStPZXR43CwnJ9C1HM8zzzTBXJkAxDBgJzB4FI76pgpzxeMgSfxNYMK WA3ls7k86ZyACXEoCt2zaiXMIGCYzK4PwBwjFoiRU00vGM2T0SK9grZuwuxNYaE7F8mlbW4TUSOCN kbA8SfFaSlSb0MXFQDZlcA3aFMStzfB9fLjBFGOeyxWITTuZe83a4geGVVt8hLgEF+EShWmdkf8VX eTuvgKEQN2shMyoxqddg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojLyx-00F4Ht-ER; Fri, 14 Oct 2022 14:48:15 +0000 Received: from mail-am6eur05on2082.outbound.protection.outlook.com ([40.107.22.82] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojLyu-00F4H1-PM for linux-arm-kernel@lists.infradead.org; Fri, 14 Oct 2022 14:48:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oc50TGtZ6rkublLOtf8InuWhVFB6KrBaEAX0EspqAAg6ocyoDf6ChT85TXn/3Z12fsj9U+sOs0qWrEilhw4HPTRiAzzBSn+50XUqCjQbm5KDCTQO51O8gyHrOD66O/hNOixkLp6TKcxE04wu+Bv8UGmbBTA2tEuAguIGFT/5pzYNJ91slFcZWbzHc6vWSfBYPlCbu2KwjG/2jQjWOxZA9asdm2kDSI2EhUzZGrDIskxl+4yjq12yfVxt5zX8pxasTMMGQN7/Vyh3OVNlborlycADBFJvStojhfCa8/6sgvahUFeacl/lasKxIu+5eG7rT9RxVeuHGTGz5zcXClfKXw== 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=3aDEkjxhOYnIcRo9HhsxpLkyLyJY5BGHp1HUrMug9qU=; b=dDUS+xknqYaC+bPEKB7vGKTde4Him6wCCb2V3jt28GumCs4UsfkJDD30YpZXBLGm+tXIkDxgHDb8nRN6O6t6HAAfXLUMbY8xAXV6elZbgeSpx8mHHZU+ZwVa/ayqNDqwIa+J5zqd+ZiTQ6LbsF10tVjBAF7N1GO6SrfumKaD0FvjbciMQWkFXfRduJQ4tOqK37M8IlRBBhIdUffSfbUBE230tGk1ox5Z3JiuFuDjtEB7Ydzslnvdu7N+EksMTPqgXjLLEmSFkFjvYsRh637+x/139PwmZ8bOwuaZPpMVtU7/bwMaA9X4fD+1s2vpBN2sMqBLHL5bb9lLt1wwD3Tgdg== 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=3aDEkjxhOYnIcRo9HhsxpLkyLyJY5BGHp1HUrMug9qU=; b=UW+pYuVr9QDZMKvFpKtYVhG4zuTemNfJiHOIiyIIgCLC0GgI5MTy1Go4s3YjfEoTO7F9zIwPYK8gyNNIAzubIixlIyqhADcPJ03KJXONS+TqKk4uzEFyNVEvjE4jN1EnY3DX3xWNhmRFyynXRAAfJrlMzdCHKCZIiinDZYCk+SA= 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 GV1PR04MB9133.eurprd04.prod.outlook.com (2603:10a6:150:24::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Fri, 14 Oct 2022 14:48:08 +0000 Received: from PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::4150:173b:56ec:dc6c]) by PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::4150:173b:56ec:dc6c%7]) with mapi id 15.20.5723.029; Fri, 14 Oct 2022 14:48:08 +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 , Florian Fainelli , 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 NET v6 2/2] net: stmmac: Enable mac_managed_pm phylink config Date: Fri, 14 Oct 2022 09:47:29 -0500 Message-Id: <20221014144729.1159257-3-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221014144729.1159257-1-shenwei.wang@nxp.com> References: <20221014144729.1159257-1-shenwei.wang@nxp.com> X-ClientProxiedBy: SJ0PR13CA0217.namprd13.prod.outlook.com (2603:10b6:a03:2c1::12) To PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9185:EE_|GV1PR04MB9133:EE_ X-MS-Office365-Filtering-Correlation-Id: 44a04189-2a50-40ae-5d6b-08daadf31c16 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vd+TZ5hk2mXrIVtUfYUT1A65/DzdKYk0Ud/gCEydtdesUmBk7mZWOjBBxvatTbDMo6Lobd8tYV1AitGWEYbWM3xbCMwwV6ljQqWaGCBIJMoVvLJMw/WuxurU8aKUnsVai/cpPyol8aGJShPHIo7tIvI5PixjW3GiFnUJ50lGeEXXFQVopoyG1dHvXknmlu0PHQkqPAEMSxlb8kYHKN+y8nujhOSfjnF1GVdLv/0fHL6/E+n1IMJl9AQ+e1eqQutbs/NXLNzNg8oT6QunLQ407rkKghG9H45kWCfDqbqsCnYgEXfX18WBldNOOLN1fw+JYvvdgd/pNa1o7/3tXiLlV4qo6kGRhqovEV+wr9e1bEdtqoOUp0+KuVGVUAIdx/wBJWjDbY3uoal7Zi2fzx9sM7FkDlbQt4jpeab0SXxFUV6u51sUKFjiB+vLuvMtl5pTcvK2QxLAhvw7Ecyx5yX2V9kjc/elIs7Nj5wr+uZV8uwpOUCgDvJhd6vxyC2dc8KNyL/Lex1aTJ0JctfDoTSL4tXk95S+sF8PTPywjv0629ktgGobzUM/dSmqDoPqULaQ1/4auAFi8QTHMvzA7EHzGWBBz2kbxLyRXl65iw7SfXBBs2HWYISf3KfpjUh8lrpx66KD7lt5DfSnmUF7IT4O5e7ERcdCfR9ubItMzlXOzEDwu0x6l8h4mn5JaVHhWqDEBXG5k2TaEWfeXMvRJcJ86GSreGLZiQ4WTotsvACVcGEPuYVx71kQCsiuUAJkvJ8df67x8HFbVEkRgHiWOOuaeQ== 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)(346002)(376002)(39860400002)(136003)(366004)(396003)(451199015)(5660300002)(36756003)(8676002)(54906003)(41300700001)(6666004)(6486002)(86362001)(4326008)(44832011)(316002)(66556008)(66476007)(66946007)(8936002)(186003)(26005)(6512007)(38100700002)(7416002)(52116002)(38350700002)(2616005)(55236004)(110136005)(1076003)(6506007)(4744005)(2906002)(478600001)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HqgdlSg3nxgF9lwL4FDxXtgTrQDy6peHDf5RV0QdGd9WSgNWx2cFGJJijdKdDS4rx3pK/Nc7CLaTSSnUPX6ScP56VRddaxJxbLCNiBi126nimfavp6KrwPYA8kvFVls0lgcHg7dwOr+r7YQIA7ATPKxtuqKzssvGinMkBUooWpbgGiZvrNHvXFkJlQi2CG56F1ajusIj6WSjP8eH/8WU7hmOQMGSOdpK6JsT5a+y3hM1Zzyp1S0nxMVboYniIg5KxzSUkyYuZhTE08P9dN4mbo+XOTzUwW6tpQ14TGptAxfc7eDdol+sVtzm8ec8LIGmhEUXDjsqGBXpfFcwPwsQL427A/fpqXMHEycmHzZ55/gQeHiHpXYCpiyDNntTYRORxBcTwCijXEc8rNX4JlFMVb9pj7FinV6xueWX95jyNU34+zNuXQ2rY470YjyhlHmH3edG7lkTiwFpY71bB8Gf24Iq7/Dcq8foaYLcUDW1SWkUWnuHy8HjTwczpsJUKojpKfdUWayCLgM5ptXciqASHG218tp0uH0bPS2fWrrkbQ7eA//7F2UmI7M2xjc0jTuFu/tpIRAZTFnVAAhkbZOJOqUFPZNfPooOiZctGCF6EYm+VMMJIoXUDZtXZ2wTRyvZK2pFWZ7HpxZFFSHl010riaXC7qNG0fR4BYVwhAzS6TcQSdV7e6cfoG2hy3kofKSZLPKm/OpGSoCnXRmE9lBmtWZlwCBFdySoc7YxkAmIsCfyXP3lj4Rum/UUDeHozi9TPELHor7Ezr6w5J3EWWSannFD0zqJYUVYuWk6VQMHPoETdmn+ZAnRWQ/xzbQBvf1c5TMMLCV3fp9jx8askB4Y1HInv/226VcNjFgp/z5igg//k1fYr+gGkvPD6wTQZog2+QkBWk4Ruo4G9ZT+zdE8Bc0K6pc9Y2orFZ3h8TRdp9Cf5y6EiqMnbv89LeFeIuAUAi7zCfYM4t11niRPqrsKSQuGadDqNLBmLBuZ0iF8NU43EVtHbplge50n8WTC3x/GGqhkvZaWv/sCQW8VVoOLqKwAscl5K0DY/7a6kD/DgA9O9VnsrYnGVV3/Ao8IxNSyZnK/2BS5JjNjxfOipSpW/cKJpQWteCP/J1DJYzxs5ZrsxaWYG9JyrHs5TlR8eBjHNUuFxeXcd9GUhsiUT5J9FngWaIVpBmGpKCNQUHEirbjyHOZRS38LMf122u5GjBG9g/WdUwIfEqJvNy9EsQDoVHmm6PwezIRpKlhcexzv8YB3kDo/QHobt7pympCXWLZZ9GocG2rbA65rlxTn+8BWrZKfGN4d6edDPFZxVoce6zIeZimI/Ql6wwoF6QDbumb02VbNcZp+6CVmAD8glUrrqNJTvpl1Y7V0LZD9O49HsLp5Ny2vLHN7/pIZHN5bJtmWbmnfZI4FePyxlc8xs/QFpA2tuy77pxoN6lyzidc9MFM1rDzeXiK3qj5rASC1fD42b/N7XogDuCvktrM0TbK5vfUai+Gi9vHDh0kxPC94XQcVKeU2mE0fNxb3TQb7wIvyGKxGlcLjTvEeoWHUpL+mjwy5ZGqJGxX05nfBwuuMGONyDci+s0m5kOimvKbUKYTF X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 44a04189-2a50-40ae-5d6b-08daadf31c16 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9185.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2022 14:48:08.8419 (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: 4q66nAAhV9z9lKUs7AqkpzALHSi/8y+P4LER1fp2Vl0jCfMV3Q1eInLoeiPLlUQduYRqSgfixI1+ItmtvDz8hw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9133 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221014_074812_845913_BECD4037 X-CRM114-Status: UNSURE ( 9.94 ) 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: 744d23c71af3 ("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(+) 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);