[net-next,08/12] net: dpaa2-switch replace direct MAC access with dpaa2_switch_port_has_mac()
Message ID | 20221129141221.872653-9-vladimir.oltean@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp362946wrr; Tue, 29 Nov 2022 06:16:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf7THOWqgos5//WaMLqRc4bTMG2DdruVYiwOEowCMiLIWqyetayuZobjtCHuh4m852a9o1QS X-Received: by 2002:a17:906:715a:b0:7bf:b6d7:63b9 with SMTP id z26-20020a170906715a00b007bfb6d763b9mr9202917ejj.238.1669731371890; Tue, 29 Nov 2022 06:16:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669731371; cv=pass; d=google.com; s=arc-20160816; b=uxapsL5GAl4qFipjXBeFAhbkRx4n3oBixqJ3vJXEN8wbYCkgp/Lg5Dtm7Nsdvw8rh6 H6vBhY2/0PE/x+J2aum23g2BuT50tv4irNCD9JyXbicVxsdnnQavoZzrHqGASYmRA6tI eNxuGlJmEcAfjwg9hU3fP+JRuCMfgawGNqPREWV2mekmFFO+yAW9SWMyMuWn9aG03x2w zfVlKyQEF/eBVpvRHxL6iRJlEGi0UYvKGwTKsVmmPLdWnkCZ0/BOYhVR7omPxy+l98Em SguKT2pkO5NK+IXj2BR1gFDb+r7RDwSXbM8IwZRUUIz3cExIWt/gDIdbWO1tWz6tXtkJ PiXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ezo51H+43DPp5KVZCqsH636wQ5JiPwfxPsHF2yGFLV4=; b=CTfdSw1Lgh6z6u6iUEAu8VsIzjSahz6ZE09W37C9yvn+ypCWWtcSXPfbvXmSN5pUNQ qFmIryCf9JwG5hOW93MOGyKN0qGUWvAK9V78wwwWtbLJuk123GECex80blTYmsqDD9pZ HlMCWbTThYd9rsla2zZ2aisdn0WTtwkkV+e3G0X0A0fTYMcTcJ24vWYrTP1sPx6CUwVQ IO/b+pobVM4lLhIlivfdiZn6LV24wtGxwUfb5hNKSdpyiXY+rAsmA3CR3C2epSMcDvW6 Dqr9FaBr+sNOudTo3YWMe11KguodsrOy7eL/ZyGRNqJ0RaLAqv9sEfOdeRr4IhXkEAbd I8iw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=MsFZtCr3; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp17-20020a170906c15100b0078e29796733si13001201ejc.653.2022.11.29.06.15.47; Tue, 29 Nov 2022 06:16:11 -0800 (PST) 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; dkim=pass header.i=@nxp.com header.s=selector2 header.b=MsFZtCr3; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235535AbiK2OOZ (ORCPT <rfc822;rbbytesnap@gmail.com> + 99 others); Tue, 29 Nov 2022 09:14:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235356AbiK2ONg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 29 Nov 2022 09:13:36 -0500 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on060d.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1f::60d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D36761515; Tue, 29 Nov 2022 06:13:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ocNBFibuPqQ7Becsg2eHRGRlAVOmd8tewV4nakibqZqwr9a3DC6pc2+MHj+oPGjmRtFMx37QF4RebyHLiBHKCzHgA8H5T7euXZx8j1tWIGXdxyqtnC1VGfOFIq2vhHXqSbkgqPZkALAoVyQcTOfYfYg1z5RJH7z9YNJ1zKV7jvLVF82TpxPk/48qq4+FdEVyWlgFAqA7gmxlzvPHF/e/ZccSXi6ozfmvyKXSfnc0WfS3wv3r9A7jCcTTfMPVNkim2g3K+YJruhecEsIbuQ6KgI6WmNRktEjD/zkCIvcv8dm8cge1K37IU6fdD/mJxLvqgrUspniQcS6V/B5T11BrhQ== 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=ezo51H+43DPp5KVZCqsH636wQ5JiPwfxPsHF2yGFLV4=; b=nFQpNJCqXT7nVc0NE/HgoNsUZ/d7nsR0NkxZbArLJ6w1SSzLzBQ6xOUFhY1tr28c69Tka+l1C0QeaMHwFZVKa/qLpsd59GLZQCdr80kASFktSrOABhxSIBTiqofg6Fo6OH6m9nus7ExHIxigEpEGLjNQ4CMKoH1BHz2kUQdbRneOq9WD7oVX/OA4xx83pyW4JyRMiGEw/Ow7L4Zh/hKNDDz8r6aWVuC2nJ4zoO29guwYpM+HXfgP77ILWFFPmuaKK/EcTD8AVuXr5xnkatquHzcbPPUBtj38UXiSO6vJn34JT5bqG44uLB/89sBKIcT0dL1lidDIzn/wMlwy5ugKhw== 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=ezo51H+43DPp5KVZCqsH636wQ5JiPwfxPsHF2yGFLV4=; b=MsFZtCr3zqL8E+3nWv24/CkrzjNBVH1fs6ZLwIej5PYK4aCWucK8YxD7JFfNFBk3q9DM9jtxizZGSc4HM2qDqIY9ajlCp5h0fK/qeY5CzZJd5KK6B5BQzDCCcqMzwB0dQD/Vv10OqsMg4uPl2tIM2XNYEaQlymc4xtEZ2R4MXlg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by AS8PR04MB8724.eurprd04.prod.outlook.com (2603:10a6:20b:42b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19; Tue, 29 Nov 2022 14:12:40 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::9317:77dc:9be2:63b]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::9317:77dc:9be2:63b%7]) with mapi id 15.20.5857.023; Tue, 29 Nov 2022 14:12:40 +0000 From: Vladimir Oltean <vladimir.oltean@nxp.com> To: netdev@vger.kernel.org Cc: Ioana Ciornei <ioana.ciornei@nxp.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Russell King <linux@armlinux.org.uk>, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 08/12] net: dpaa2-switch replace direct MAC access with dpaa2_switch_port_has_mac() Date: Tue, 29 Nov 2022 16:12:17 +0200 Message-Id: <20221129141221.872653-9-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221129141221.872653-1-vladimir.oltean@nxp.com> References: <20221129141221.872653-1-vladimir.oltean@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: VI1PR0701CA0029.eurprd07.prod.outlook.com (2603:10a6:800:90::15) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|AS8PR04MB8724:EE_ X-MS-Office365-Filtering-Correlation-Id: 39d3d619-4334-4802-05fa-08dad213c5e9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c409kLmaYJs4VG0tkaBPTF8Yv+8YFMqCbrVkyh5jus7m0h0zudVu4+5RYS26mHQZiXBHWnde/cV8g0EALbYoKcOn3nMvO9sX74IRO/Y3AOf6UBhM0c6yrdOeO9NDApEo3nsZWJGrx9XLAz5UpRGNmh9KTzs6OcZVL7QAL+elhoIRHcTyYEZ6PEsClJQ/sRJGGezzWCDgQICFUTwc7P8Y2GycY9M4ORJz/1+0BaHhlS5Du8PY8TEBsGGM+B40d0sBHRYJL+LYUcycYc5oR7PfZQLuC7s48ntPi5YjHe5wFm9j0uS+cL1TwcTe1yvE9ajVKYRsc7XJzzQ+l2hJS0f/4I6E2gzaC/ucU2RuCigyjxBHf7zAQ9giBEVc3m2JLL+QAQnrSRnC/dFHQCAIDRYJ29f66ZZMSHXdr9iSC8Y7LJHopIxKZqcAsYJo/YlaWGGsxytcyRe1QIor5EWHk8y9baWv2J0gbG3ciwXFIitVd4TnHaEL+pDMx1bcR5B9mZHsmZn0Wzj8w/P/qVBHFMul4v84/0SAfo2kuzFniugrd6OfYoO4oJpS8BlSCpcGx6aXMLq5aPfMqdsoW4XLAy1FI2JNlx66LEHbOLRYMwQVhOXtOBJcSlxuzj3QlmtMFcZGvssDbzUr3wZiGsY74kcIEyFaSa1hGRq2W0K/liWhipIErAO3AeyNoHwUdSS3g5e8Y9VVf7fgvITV/nQz/pGNTA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(136003)(39860400002)(396003)(366004)(346002)(451199015)(6666004)(6506007)(6486002)(478600001)(66476007)(1076003)(36756003)(186003)(66556008)(2616005)(66946007)(8676002)(4326008)(6512007)(52116002)(5660300002)(26005)(316002)(54906003)(4744005)(6916009)(86362001)(2906002)(83380400001)(41300700001)(44832011)(38350700002)(8936002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lYtgopuQn7z3Ghx8IgyblV2MfJJWahx80eehdqjGPqPLXYNq8xOyRVyO+ZDYo+S3W4XHE7DINSkaZ+ztFdXoeju/YsjW2/UGcwD9BqRo14/Fmc6P7uOYxXmwsd3diICHbm/m60qs2emgCI+xmAUWgPd5OQTA3byP4qtTtXFuvvWPoQf4/4lNS/z5jOozajbN6hfzr4dxMdX5Zbze9+EQYAIvwWlG709CgUTUY1T2Kb7IJDitMyA77QSgDhNyAKg6u5c8gJQjTDl86hIUTC/f69qCXCxY7MkYCWXoghHf8SGeSVVxqfCgYRGSYj0PNpZ7EFFM+ucVSx/l/6uhJCfisS3SWuumNn1kBiy+ThfOfbSxSXTLzBv10Bksb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pmGmkSMXdgPgZ0OKzQfUdbXxLGZjQh0+UFnA+P+N+6DBCFFTJlP6ggMkaiRwHFKiWO3FueC94mxHOTw249bli90LGtQ5b603PFQZYTnUN8//hOIJwqJORyepz2Tqu7WiOfOh4hMpb6v+cPFf6NVcRUwXHVucuVbeHnIQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39d3d619-4334-4802-05fa-08dad213c5e9 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2022 14:12:39.4972 (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: XeEUHtdCE8AKZylsWn25gKNcn7HsNCXb0IwvmfWQ+trx6wI+qwZl7UPfnwzK67dtkENH3P0H9OQTcgLFUIByvg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8724 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, T_SPF_PERMERROR autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750840242913023979?= X-GMAIL-MSGID: =?utf-8?q?1750840242913023979?= |
Series |
Fix rtnl_mutex deadlock with DPAA2 and SFP modules
|
|
Commit Message
Vladimir Oltean
Nov. 29, 2022, 2:12 p.m. UTC
The helper function will gain a lockdep annotation in a future patch.
Make sure to benefit from it.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Tue, Nov 29, 2022 at 04:12:17PM +0200, Vladimir Oltean wrote: > The helper function will gain a lockdep annotation in a future patch. > Make sure to benefit from it. > > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c index 40ee57ef55be..76a4b09e2854 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c @@ -189,7 +189,7 @@ static void dpaa2_switch_ethtool_get_stats(struct net_device *netdev, dpaa2_switch_ethtool_counters[i].name, err); } - if (port_priv->mac) + if (dpaa2_switch_port_has_mac(port_priv)) dpaa2_mac_get_ethtool_stats(port_priv->mac, data + i); }