Message ID | 20230222092636.1984847-2-xiaoning.wang@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 49A11C6379F for <linux-arm-kernel@archiver.kernel.org>; Wed, 22 Feb 2023 10:14:20 +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=K+FjegaB5hDRl1WmMcutcXOkbr92Yt7zhrsCDLPsmj0=; b=l65pdmGX0VJb6L cj0ROkl7SsDveK6GKMqHMmPlFnOAEkGmy83A4/p8lWwyQc1f/rHfCPLwURW+llBfygsLBriuFJsvp CAOfvK+UWOJnTY+DMei7/nBpo/4hvxr4sIwNQPd2+nwpWxki80V33ypyKIWslp9C+m2Rs04r7hoju JxkP1aNot+c69d3iJzYDtReCN1WztbpAO/NoYKFKcNySib30YHM9peYhARekuSuXMe1gAhmOokSB4 limXQqhDAbUsLZEQi9CE8qfEWcrS9Gq7t2YjnzhPZkQONHgNzQ+mnE8eUEgr71ec4qYO4ao9yCRiH G2yLVjWceYdV+inZUrDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUm7A-00Bnlb-PP; Wed, 22 Feb 2023 10:12:45 +0000 Received: from mail-db5eur01on0613.outbound.protection.outlook.com ([2a01:111:f400:fe02::613] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUlQj-00BRFL-US for linux-arm-kernel@lists.infradead.org; Wed, 22 Feb 2023 09:28:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=igJ00wVpLN8BqUJGRL1kCNLh9aQs5WUHMp5brskLFFJTsEjjOvSJ3jNRuugjHkvGp8CgvIMDcZEeAzzp6LaFVW+lzM40A0R8OVgjlbV0Tqk2sO621zNr+Wl9CxXMb8Ks0BD2IPuVQPbEG4HIp2MaEY+Ymhas9sHUc7etQ4Fq66oYYNtyOskL24vGJCIiTW9aIfgCGoSsHXmLvs5470hqFYn6kRWboKfJQ/mIoj3FwQAJjckZVRHTj+a/s7t3lpRy3NC5wMGeiyXQkl6qhwts6+kejUViam+rgSylcxwRBzAuVfyg6IYHQNtB3cXggFYV4hlRSU0jCT1wArSXIedCYA== 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=CyoynQkskN1O4sEggNgAldSJwdQeO6Tp+Ujrk4hI9pA=; b=VXgf9mH9W9FsLiKwMBvpG5zHJMUCFT18bcVoVHJ6LKQX6pprizSJQ6exd1pK4vh80odEDBXe68nD7UHDgwCdY/eRdAHObLGoYZlO1MgvyRcJB+3zj7tFS4aJn/F849AUqXhB9ZjjAOgIBPfcDSsyD7Zkn7B0BXiTvNOgMrUSHP2ZJy1oOYnMU1V8Sw+V6F0zlEtf4PsPym9CrnvUYPg8CLA+c0eiGbJaofZ06IgHyhJ+/ToXFn+5VCNVNzrkrDTe07mwLiEYJmtCvGTZ5vYwSnFbzJLpu3wG4ioRYv00s5dTC7SYV3n10UsowsfHF6HoJIayvw7/M5EF4RtHU4sYYA== 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=CyoynQkskN1O4sEggNgAldSJwdQeO6Tp+Ujrk4hI9pA=; b=VslS30s9Ao4JrvfbGZutBtyXYnB9DnesP1xiQIX1Chz8C4pm+Y+re1T2VJnRq0xTGmFVej1NcnwD3hiBYGjQVjTPv1QOkFRstVbah2jKqgKOX0Gt3WilvQqLwFM2xykKDEH8GQpD7ZI63MFZ+P1FqtQR5UYzE/mDJVkGVMMI0Pc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from HE1PR0402MB2939.eurprd04.prod.outlook.com (2603:10a6:3:db::18) by AS8PR04MB8468.eurprd04.prod.outlook.com (2603:10a6:20b:34b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.18; Wed, 22 Feb 2023 09:28:48 +0000 Received: from HE1PR0402MB2939.eurprd04.prod.outlook.com ([fe80::4980:91ae:a2a8:14e1]) by HE1PR0402MB2939.eurprd04.prod.outlook.com ([fe80::4980:91ae:a2a8:14e1%4]) with mapi id 15.20.6134.018; Wed, 22 Feb 2023 09:28:47 +0000 From: Clark Wang <xiaoning.wang@nxp.com> To: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, linux@armlinux.org.uk, andrew@lunn.ch, hkallweit1@gmail.com Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH net-next V4 2/2] net: stmmac: resume PHY separately before calling stmmac_hw_setup() Date: Wed, 22 Feb 2023 17:26:36 +0800 Message-Id: <20230222092636.1984847-2-xiaoning.wang@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230222092636.1984847-1-xiaoning.wang@nxp.com> References: <20230222092636.1984847-1-xiaoning.wang@nxp.com> X-ClientProxiedBy: SI2PR06CA0001.apcprd06.prod.outlook.com (2603:1096:4:186::21) To HE1PR0402MB2939.eurprd04.prod.outlook.com (2603:10a6:3:db::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0402MB2939:EE_|AS8PR04MB8468:EE_ X-MS-Office365-Filtering-Correlation-Id: b0d58544-40b2-47d8-7dfe-08db14b7335d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QVk8PgwEhSfq4UT0n2QMA3RJq2qipHuId2OqBYxf2RoJGvvIiOgAfY9K3kmn6hkADYWJaA7KAbqEAykuXJ73eiAelBNwzSJH+g2bP1U3zqlnTemXRVZyBdb9cm2kBHwN17OwLtezZ/BqW6EFDB7pqaG7HSwgV8ul/yinwzlSzVdncRZs2td0SRyBeEB15IzLqAREEAD+8IOYSgi9CYOUcZMhLbFdB+HtklvIS/l/KG+1mF4fvZwVoZjyPEaWCoyDDRwUQ4AAUKvsQijKPPijRY2ZZyXqAyr7acJKp8GFWnwcKYXo51UvV2lByUdjpN1y7R06mZk9s0SJxZmovEd+aBSUFSCqE48k6r06we8uszND42dFc1Z1Cqo8dobia1nd4JBVwvxmlaUWOJv7mDJyMYVRXkI9u4LyG+HoURZNvr22ltxSzqz5QAJLrTR1+RLf7Px5iuT1vfvCZG3JZc1ZbiXt/RAkqmotP272yPzDiULwaskr73fmRJiuWpxXjN9QLX67ANcggHJEIF1gq26a6SbWuAygl2cH96uGfqvaO2Ae2uhtHBgPR2tf57VmkWEvPHJOIio+Dj7FZGb6ikpoUMYCktO1vzEfyYl2uUDICo20HYI0tMnZp25aLyIk95tQ9lFBqkxXRskn/PPOgDE3A9H4svp1Glf2+gBpJba+Egxt9OnWVXASI5myJNjr9LAell7RzVjK3uz5GNYjoWkJ7bGK5SIiJw0RUh79SYewZH8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HE1PR0402MB2939.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(396003)(136003)(376002)(366004)(346002)(39860400002)(451199018)(86362001)(36756003)(8676002)(6512007)(6506007)(4326008)(186003)(66946007)(1076003)(66556008)(8936002)(26005)(52116002)(41300700001)(2616005)(6486002)(6666004)(316002)(478600001)(38100700002)(2906002)(921005)(38350700002)(83380400001)(5660300002)(7416002)(66476007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tFc+Wx/10YtwNqPwdyzahO4huoPjifH/fqId0n/3TUQF7gPm9Sit/MrVVnucPM/uIJByzFUU5wESd3+ZFDlgt8v3p+r9eZdGmb0gU9mqD+TlV1FeekPrKIWpzP2kJ5oRDGSUm1TJRvU7SMzwLMfSlWcUXhfOjbhZvjFfrc4ykzd/37296EXif64c7xsE28hPUScZh9yu1s0dhsXXgy7PWGFP8Gv4CVUUY8AECvyHKMpXmP5EGlxDEOSMlFVSpTo9nQHD8wESmPTgyz9HzBQjBAW91e2IuUZ0H/WhGc66221lSWS/2Fqu8UumcoPhxZKPJ8NwM08Duea0Es4FlG9pHlKWv6PK/MCR2AS+5lpTslEy1fzQBdXTlKiuny2QVLDbnRgmRi0ZV67OZBmb3pdXCvd7/BC0hZ19mq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CPIIjThyKfNtKZq/T/MCsi6Ax7GLuNQpqAPOWhSqkpXacBQmFShJqdx8uzx5NuwR8KL6ADqTxgrfzzdNJe4SYIUXRsSSPTki9Aeog== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0d58544-40b2-47d8-7dfe-08db14b7335d X-MS-Exchange-CrossTenant-AuthSource: HE1PR0402MB2939.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2023 09:28:47.8580 (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: sMl89UcPZE78ujwogS0UCzig8xWSpqFj8aEachDAtJJZmPWe2CE542WCB+bTkS0KNpQ9Jjeeibd6/3XWXWYvLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8468 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230222_012854_054713_B8C2FDB2 X-CRM114-Status: GOOD ( 12.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
[net-next,V4,1/2] net: phylink: add a function to resume PHY alone to fix resume issue with WoL enabled
|
expand
|
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index e4902a7bb61e..75857b85921a 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -7541,16 +7541,9 @@ int stmmac_resume(struct device *dev) } rtnl_lock(); - if (device_may_wakeup(priv->device) && priv->plat->pmt) { - phylink_resume(priv->phylink); - } else { - phylink_resume(priv->phylink); - if (device_may_wakeup(priv->device)) - phylink_speed_up(priv->phylink); - } - rtnl_unlock(); - rtnl_lock(); + phylink_phy_resume(priv->phylink); + mutex_lock(&priv->lock); stmmac_reset_queues_param(priv); @@ -7568,6 +7561,11 @@ int stmmac_resume(struct device *dev) stmmac_enable_all_dma_irq(priv); mutex_unlock(&priv->lock); + + phylink_resume(priv->phylink); + if (device_may_wakeup(priv->device) && !priv->plat->pmt) + phylink_speed_up(priv->phylink); + rtnl_unlock(); netif_device_attach(ndev);