From patchwork Fri Feb 24 15:52:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13151450 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDD29C61DA4 for ; Fri, 24 Feb 2023 15:52:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229577AbjBXPw6 (ORCPT ); Fri, 24 Feb 2023 10:52:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229568AbjBXPw4 (ORCPT ); Fri, 24 Feb 2023 10:52:56 -0500 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on062b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0e::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF3FD1FF6 for ; Fri, 24 Feb 2023 07:52:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eXO57+wGkshYX8YKFNOO3Akv/iqcTa/lxZ19+YxHh1rm2j/N/9yAl+CEYk8AsuUGt5TXF0yfx7Jyy0nxNiN2CN8v4yOciIoccsoxt/hNCg+8/ba3uP/7jtIHfLb8KpTrPCRY5ZmlOUWtJNpVuoq9vdz298ZjUIWByhk95uu0CqDXI+StgD8Sp9KZORikdk9cEyiyzxRwXgL7Fdg5Aa5QIcvbadTVEJgvzvVRJuG3xHolDUcaRGyhbl4X0KZdrdEvSmVjdUmAFgJ9753CD+oNAHvyEcokrmnCY9MLyw5xR3mm/iZKVLaO/R+9L4ZrhpHxc7s5sgZj6IcRenb0FPQEEw== 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=w3br7F5F2wQioFC1L6+3l1HhZ2OfUbTAnDD2oBCfSqA=; b=fz1qglUZjRkhBd55LcA4Uk6Na2NK+qM3RqDiT3xQsCQ93TVuaS0sH9EsSmBMIMRh4rGH7poCHc6oAW+0vzMk1cg8TM1qA6cRi3IXGS8FTA49gXpTVPP+RIcB9HJIbJ65gIXDuYYpjPYRJ/aFvSXGVxsBJqu/gr2U64uk1velSMZ2DEE3Wj+0FYudOmnIxxefbxwjmM8a5u8dtPptG+tkg1eHThHv9qJ5UVoN/8wi1ftuLKV5RYZgJTK5ExOj+5CgWNx9KREab6dGS31aqXAcGmxD+06/E+tJstBh6kuxq3Vc+Sk5TJNSarcRZ6kjMev6HBbPWdVH0R8FGQ+dEPf39A== 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=w3br7F5F2wQioFC1L6+3l1HhZ2OfUbTAnDD2oBCfSqA=; b=GjG5RBEV38ArRxbHABtqjCC8rlzcP1f3UIC+pcOHMNR7KamarAfImbkadKrybV3WdBufowm0JQIRs7y6nBVDPc0zTUbK4hM/4Iptmofl7rDpv8+dALSbq8hXAAa6rDaRHpuuezCyxuht9TNJhT29YIWxFrgvy0Fos+Gnii0qttc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by AM8PR04MB8036.eurprd04.prod.outlook.com (2603:10a6:20b:242::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.24; Fri, 24 Feb 2023 15:52:51 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::29a3:120c:7d42:3ca8]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::29a3:120c:7d42:3ca8%4]) with mapi id 15.20.6134.019; Fri, 24 Feb 2023 15:52:51 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli , Colin Foster , Lee Jones , Maksim Kiselev , Maxim Kochetkov , Heiner Kallweit , Russell King Subject: [PATCH net 1/3] net: dsa: seville: ignore mscc-miim read errors from Lynx PCS Date: Fri, 24 Feb 2023 17:52:33 +0200 Message-Id: <20230224155235.512695-2-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230224155235.512695-1-vladimir.oltean@nxp.com> References: <20230224155235.512695-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: BE1P281CA0101.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:79::19) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|AM8PR04MB8036:EE_ X-MS-Office365-Filtering-Correlation-Id: 26443266-ab32-444b-684b-08db167f2eed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Wf/plYm/Wr0YlUtpZmguLVXFlx1lrHEFn/1v7d5srfEFcA26AuL4hrLdmJWn9lQvvrmxK+QCdTMl4SHiLJ0yDMn55d6wmD4ahvhBY2GxqVwt9/lwRNuk/fl2wS7Cu46al8kjcrBMdCMpxcOetKvHYzhXF+wGokTNP9zHtJ77iTRGD7uBG0G+U4KySpt9SboW/jrg2c5QopCNmBwz60zR+YmAGjyIijIjnJTsMsA6p1jEzH5ZKRymkBMS3ZbCtNc94lPFEh0MgC9pY7Z6XntJhN6n/HDcxx9AM9nfrK3XWq+w0gSfAw9p8pugQO5zQe/A3XEeAvb5unlCRgDZte8Ajc9LVsFVsB8zrHQ2oLPWqUUmTxFXWFiaVYWQpr8qntBRwZYtRjcMXVzQKsvMEPTh5VAolT+ELYX52hmhcL2x2OMuaSm+kB9R3Jm1EnhX8EBr7UpHldX/LdXlLC0YuvhAEW9ITc+q4J3nxInqqm3Kh6Qzn+3FA5YUKaznhkpqGB5lBtlHz3wJZ7R3ZcTENMAT7QXgma8RxMSQWVBEcolrvuWp9gFdOExFpe7KngnSseGUldddF87bLLDhiWJxsdMSPI0Uz/ITU30zARxUIWTKLQ+J2rhVj0OuBUQ1x5MGgKLQj9oYNrr5w2oZ1PB2uTZkUNi6iFFisJ7sYMfhmbSG3SdNkGN5IKM3UFcK0j82XQ7k2TvfziEUPshCEsFvCAgjcQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(396003)(136003)(366004)(376002)(346002)(39860400002)(451199018)(8936002)(66946007)(6916009)(8676002)(4326008)(316002)(66476007)(54906003)(6486002)(7416002)(2906002)(478600001)(52116002)(41300700001)(66556008)(1076003)(36756003)(26005)(186003)(6666004)(6506007)(6512007)(2616005)(38100700002)(83380400001)(5660300002)(38350700002)(44832011)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZEaZ3deqx+W0bsrHUDN2lIJ2/qqcpqCCcqXgwG8TaiC93zNGuCJCZi9sP84K/Bt/RoFsvhn4GY5aESgHp3D0YDDWr+4xO+c/1pBcuCSRF+FAaTiWdVZvw40XpRdOPFXnp6r5kTneFgzqHkwvDQd/vEzh0/lhFWrI9a+JBYTRrOdR+EfOMKunFVydVH4oxWW3SmwY9yoLi1uH7mz2C3+KjYjBF0eCmP0TVTIHVvBjGrplDfGl7lcQ4MRxcWKwRmrzEL7FkPRi8Z4vm00iSFX8otCo1HgjLooqXDophH9cophojysVU3KL6Unxp/PPXH89rUk1BOlATnxzqX9dLTxgXjBaHtm+hrA5y5BKfYFaj5L+pif0rhRpNSn8ZKmYcwg6H033qNX9DGzH/5M8bM9eCGK6W5zasRvyggg1enOC+lbWCz4DOThNmlLZljsOzFHe0/JuLPrJRQ4lpKhCljCtcveU1ZP8k/x56EuX9jtUpWEm0gtHYdaW5/3bO0zKqi/DYYFUAvy88AjPoHDr+LqkJt31JDecyPNyxD7j/+9DbE6RZ7k4xp3tJy6et3Jtt5H6IDpUNbJFX+yxGN2BzYpa5j/WWc683IllIzlasxD/RWjnvh1H5Fu6XGW8Zbl1x6hhaqfLYIf9cWHoyZJdWuRgLqYm+q1//bYCBDPbP73tTTFcuZWNHUiPNIfOoHlyKcQgatX/lC67Ki3aD86kKmbq6s1Sv6K3dNIOR3u0qEpJyeWkwBFUs1E8zQUCV93QNEGUWO2NqVxrGhmqGEYt+r5tkIVvJ246FORbL7Q5mW1xB73cXmv4RUdsrwuFFeiwGQs8KdK9TzLl+VPh9e+V4dSj7DsnrXQ9qS2J1yIkUMYlCaNFhOAykXumyg0sJ1gN82VaIpnmWET5jWlNP53DRPYodaksF1ShDZFVybCJYz1g2FVMI+CfewfqY/Hf3MDIdkwL9c3Wsv1iFh+jNUg87hoSROToHruyy14CWTis7LDTNHQV7eYK/NjcizDUhhsW+XtpwOE2G+cGp8XM/n0atNP/524SfjOHyY/GbErJL1rfXoFz6yRsjZlBfcleSMTLIezl31kOUeTyG3I87i6PHo3G2qMAPeA2ejn+0OMFcxqkgBwtXiuyljs5ihSmFdLUy/fJFuAuwLdAvqXJ/EtXMnU3zM9d0L58DqHWhnPjTP7LpG40mhiWoTavvifU3B8t0aZo11bxNiSMx4MU9Ad6Lsl8mZjqqfnLV8toFn1Uj4u2gwKyCmBM2TZZRuP9qgJ9O7c4de1iGAj0LHhOEcgzTNUbrKztbewahL8m+CEFa11ea7x9nqN8s0hdymdq3jpQAb6UzcRoFDcwUulGiSalm/ilyC5LpIOL/svQAfCKzvTiFy4KHRjm6OtdHrPF1cdTt5tkHdTBhxKqtO8hzhcHZstrG+C6A+Q3MWgBIq8Udc1lAF5e9UGyEwrWbzP8yg5Di8g3vOrxUdC+bMCnsCMLkgLEieUrrFEdeQsL8F4/7NpVuVvHKk997gOK9D7JcU3tfc+Bs7UOeUsqC5xcS5OQQF9Le9xyC73OpScpCXR2wcqNzCH2XbX8YX6kWpowG0G6+0H4Z22+W+0xb9ixKLT3NieL2A== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 26443266-ab32-444b-684b-08db167f2eed X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2023 15:52:50.9837 (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: pEaE/k4z0aw5k3LVr2BcefEOizn+cFgv3jpAo/tpHUrSZGAKjjvsbLGSXdkCPdnJ/ALmz1L4D1wyGCnHxZUGrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB8036 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org During the refactoring in the commit below, vsc9953_mdio_read() was replaced with mscc_miim_read(), which has one extra step: it checks for the MSCC_MIIM_DATA_ERROR bits before returning the result. On T1040RDB, there are 8 QSGMII PCSes belonging to the switch, and they are organized in 2 groups. First group responds to MDIO addresses 4-7 because QSGMIIACR1[MDEV_PORT] is 1, and the second group responds to MDIO addresses 8-11 because QSGMIIBCR1[MDEV_PORT] is 2. I have double checked that these values are correctly set in the SERDES, as well as PCCR1[QSGMA_CFG] and PCCR1[QSGMB_CFG] are both 0b01. mscc_miim_read: phyad 8 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 8 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 8 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 8 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 9 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 9 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 9 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 9 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 10 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 10 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 10 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 10 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 11 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 11 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 11 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 11 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 4 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 4 reg 0x5 MIIM_DATA 0x3da01, ERROR mscc_miim_read: phyad 5 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 5 reg 0x5 MIIM_DATA 0x35801, ERROR mscc_miim_read: phyad 5 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 5 reg 0x5 MIIM_DATA 0x35801, ERROR mscc_miim_read: phyad 6 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 6 reg 0x5 MIIM_DATA 0x35801, ERROR mscc_miim_read: phyad 6 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 6 reg 0x5 MIIM_DATA 0x35801, ERROR mscc_miim_read: phyad 7 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 7 reg 0x5 MIIM_DATA 0x35801, ERROR mscc_miim_read: phyad 7 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 7 reg 0x5 MIIM_DATA 0x35801, ERROR As can be seen, the data in MIIM_DATA is still valid despite having the MSCC_MIIM_DATA_ERROR bits set. The driver as introduced in commit 84705fc16552 ("net: dsa: felix: introduce support for Seville VSC9953 switch") was ignoring these bits, perhaps deliberately (although unbeknownst to me). This is an old IP and the hardware team cannot seem to be able to help me track down a plausible reason for these failures. I'll keep investigating, but in the meantime, this is a direct regression which must be restored to a working state. The only thing I can do is keep ignoring the errors as before. Fixes: b99658452355 ("net: dsa: ocelot: felix: utilize shared mscc-miim driver for indirect MDIO access") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- drivers/net/dsa/ocelot/seville_vsc9953.c | 4 ++-- drivers/net/mdio/mdio-mscc-miim.c | 9 ++++++--- include/linux/mdio/mdio-mscc-miim.h | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c index 287b64b788db..563ad338da25 100644 --- a/drivers/net/dsa/ocelot/seville_vsc9953.c +++ b/drivers/net/dsa/ocelot/seville_vsc9953.c @@ -893,8 +893,8 @@ static int vsc9953_mdio_bus_alloc(struct ocelot *ocelot) rc = mscc_miim_setup(dev, &bus, "VSC9953 internal MDIO bus", ocelot->targets[GCB], - ocelot->map[GCB][GCB_MIIM_MII_STATUS & REG_MASK]); - + ocelot->map[GCB][GCB_MIIM_MII_STATUS & REG_MASK], + true); if (rc) { dev_err(dev, "failed to setup MDIO bus\n"); return rc; diff --git a/drivers/net/mdio/mdio-mscc-miim.c b/drivers/net/mdio/mdio-mscc-miim.c index c87e991d1a17..1a1b95ae95fa 100644 --- a/drivers/net/mdio/mdio-mscc-miim.c +++ b/drivers/net/mdio/mdio-mscc-miim.c @@ -52,6 +52,7 @@ struct mscc_miim_info { struct mscc_miim_dev { struct regmap *regs; int mii_status_offset; + bool ignore_read_errors; struct regmap *phy_regs; const struct mscc_miim_info *info; struct clk *clk; @@ -135,7 +136,7 @@ static int mscc_miim_read(struct mii_bus *bus, int mii_id, int regnum) goto out; } - if (val & MSCC_MIIM_DATA_ERROR) { + if (!miim->ignore_read_errors && !!(val & MSCC_MIIM_DATA_ERROR)) { ret = -EIO; goto out; } @@ -212,7 +213,8 @@ static const struct regmap_config mscc_miim_phy_regmap_config = { }; int mscc_miim_setup(struct device *dev, struct mii_bus **pbus, const char *name, - struct regmap *mii_regmap, int status_offset) + struct regmap *mii_regmap, int status_offset, + bool ignore_read_errors) { struct mscc_miim_dev *miim; struct mii_bus *bus; @@ -234,6 +236,7 @@ int mscc_miim_setup(struct device *dev, struct mii_bus **pbus, const char *name, miim->regs = mii_regmap; miim->mii_status_offset = status_offset; + miim->ignore_read_errors = ignore_read_errors; *pbus = bus; @@ -285,7 +288,7 @@ static int mscc_miim_probe(struct platform_device *pdev) return dev_err_probe(dev, PTR_ERR(phy_regmap), "Unable to create phy register regmap\n"); - ret = mscc_miim_setup(dev, &bus, "mscc_miim", mii_regmap, 0); + ret = mscc_miim_setup(dev, &bus, "mscc_miim", mii_regmap, 0, false); if (ret < 0) { dev_err(dev, "Unable to setup the MDIO bus\n"); return ret; diff --git a/include/linux/mdio/mdio-mscc-miim.h b/include/linux/mdio/mdio-mscc-miim.h index 5b4ed2c3cbb9..1ce699740af6 100644 --- a/include/linux/mdio/mdio-mscc-miim.h +++ b/include/linux/mdio/mdio-mscc-miim.h @@ -14,6 +14,6 @@ int mscc_miim_setup(struct device *device, struct mii_bus **bus, const char *name, struct regmap *mii_regmap, - int status_offset); + int status_offset, bool ignore_read_errors); #endif From patchwork Fri Feb 24 15:52:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13151451 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC05DC61DA3 for ; Fri, 24 Feb 2023 15:53:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229783AbjBXPxF (ORCPT ); Fri, 24 Feb 2023 10:53:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbjBXPw6 (ORCPT ); Fri, 24 Feb 2023 10:52:58 -0500 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on062b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0e::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD536BBB6 for ; Fri, 24 Feb 2023 07:52:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HcO94V/6X5U4BlY09z12bfrEWYtW6uPeZd7VUmxfWuQAeGpUHxjwOiQmEP2lsy81R9z2yPcbm54VeBPUp/Wr6U2Osm2fq8kNTyhEkF9cplJGGizm/yUPdtC2IvH/ZXG/Z58BjebjyvXCkfGaT4QNcHNTAvzE56tY7yRNzUPrlRYZ60tii//H5IU8f0KjmMOswFIe5xoqAFp2+D+5xblKgCOw7t5p8eeOtg5SkYj5w/vNeirsIdZWccdlbJbtaNNbH8hVZo/8Joe5aZV6zke3dVJ0cxJ4IcV2iJja7qFUi6ZD0tL/SJ95nyDWmD9OMqh3JBmyNto17FQJKzUqsudTsg== 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=ckCCOWJmh2Vl45rxeydv+ns8rRyGEZXMLSSUB3vB8dk=; b=V8g6HIlBKjjdEf0EXgHVUjcQvqg7xpYcaAzR3iCzKc1qhpj5kY3JkJmumHiAgPDaYJPdHgQRc9dgcOX9PQRDDL88slq7DA7esNLK+R8jLKXPLXlfJyEgg3Df0pEJOl8ETOQgvAFM/oD7DLI5Vjqn3KqdgD6AKrHZt9L2hWFD4Tw8HOWH+tUhv+j40FAgfVIHYnQ4hpb2VSbbXdV3oHB8Ba7gRDjVjNJeO4kMIUxdP2YZ0oSWmfPb2uezw1XEcGJXoc/+ILSp/R/2+t1lZXohVz+WmvsNiNeA2wDMM2grvJ3W5Hb4Ey0DpkWo8NF3CDyRTIGeU+VTar5grdQ7sQ2J0Q== 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=ckCCOWJmh2Vl45rxeydv+ns8rRyGEZXMLSSUB3vB8dk=; b=PyOpwcQcWFHXLljvNpB4G1RM8F7s1sAzBUS/UikuR+dyqGRq8d/WXVw9oJbHUp7GvZPQXDrx7Z4T7GOcfk1ZG487v5Qq3MONKgtG2u6xNX+OgUQ0qN4YVeXkNIihtFnU8/AnSqqsBGQbNrN7Z/0zXbyoUPBsBYVE6vyYkH1sdOw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by AM8PR04MB8036.eurprd04.prod.outlook.com (2603:10a6:20b:242::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.24; Fri, 24 Feb 2023 15:52:52 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::29a3:120c:7d42:3ca8]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::29a3:120c:7d42:3ca8%4]) with mapi id 15.20.6134.019; Fri, 24 Feb 2023 15:52:52 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli , Colin Foster , Lee Jones , Maksim Kiselev , Maxim Kochetkov , Heiner Kallweit , Russell King Subject: [PATCH net 2/3] net: dsa: felix: fix internal MDIO controller resource length Date: Fri, 24 Feb 2023 17:52:34 +0200 Message-Id: <20230224155235.512695-3-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230224155235.512695-1-vladimir.oltean@nxp.com> References: <20230224155235.512695-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: BE1P281CA0101.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:79::19) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|AM8PR04MB8036:EE_ X-MS-Office365-Filtering-Correlation-Id: b848ace6-16ba-459a-0da1-08db167f2fb8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HSuDbafE22g23AgcmUP+U22fhzwe01/dgXQ90R6ZQ9ULKZ2Jq4OzoqF1IxqE9DzpLby9uttOggJcwYYYce6e2j3lQ5ymyzvJe8ijJmaPwDtN6ZDPq6otlPr6UZXNy5EPVzD5jSrCs/BeGO3qZoHz+go+uRcnYwZ/tdTjjrN6x8PjwNkue0w/o05t22+RRDTbUbxsh84hXNAuV3Xykx/5wV9wmg934bpjtWpQhzTPCi4WF4hYgdXKdnA3hzhvMXlpD3KB2I7LptumeMnt+1QSPC1UKPsjLeqCqSo8t3MP5LrTJGgE4Odw/jOcQtW2EGgAu5anTfWBgva5GWzf5r7ZxnCL6UHin5fLu6pI5vj6iXTF4KxKngfXMwnX4WsEOerkoVjBUvgriy0GASlO1wjb4cr02mKx78iOBH45Nrn2i+yauFNeSz+0s8XQtRx2KziN5PYuIq6NT0+HsTMedqVDWbWSZv19f582EJFIfTlOfRCZrbxxol81OV7GMkXBgHfHl2pRz99sX7SvGUwDvRad8hYJV3oiLXscA2kNJYTouhywnQY3YSP1zC1UhYAe0QFUuLX1cdmDlG91qWOM6DrRzU47LZJrrldjlKKkLisQiBD4jJDUjX8nilaaFMbzncE3VVM+h9qdaMsU7SVF5DoAnk1bAQujAmDD9McwyA70nT9xO1HqQSj3F2KK0zjnOWk0T5bfSO2nKJuLy+1NPFPImw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(396003)(136003)(366004)(376002)(346002)(39860400002)(451199018)(8936002)(66946007)(6916009)(8676002)(4326008)(316002)(66476007)(54906003)(6486002)(7416002)(2906002)(478600001)(52116002)(41300700001)(66556008)(1076003)(36756003)(26005)(186003)(6666004)(6506007)(6512007)(2616005)(38100700002)(83380400001)(5660300002)(38350700002)(44832011)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Aw51OZT0Qmlb6nhSvxjchVdRfinWFXeRwDoIfaXa+EqkefBSEchfQGi1LeyOulw/tpkgtZE1lp8wF9FIJh7PveS/JG8t8VCwctUUYwh/qvZQHGE4iY/aEsB4nG1FZaVHDNw+JqZBkqqVdvHK3rwseJK+Q0c5ePo8c8EvZygVogy7pI3EPfMIAyXa+icc8qmhMA9oP6R9HBylZbNF60xXMXMGhpYkTjhwG3TsGbayU4hS7sz4X418SoxezXMQUwy4se7E2AI215HzhXHkDIkWvZcf3VxitbAHmcMRUyFcaJj9gqBNjfcYSJqMU/LART5Xa3XstCKNycXvAVYIKA7f2e2zY0tP90Wt4TZm80SJn69H7AdUU/mc+xkQKMuTREtZ1eDFlbtZcctzjkY2D5whGLBvRrRXYe0AyakEEP0Hsm+/KGbez++Tr6qhcbn7QIGlFyCwLlDdxVsJ0uyg90nPCdvjYh0C215gyRzR13sLhc5nIYpaDLibJ2DBkXrJ4YPPE/i5dx/IGI4MRVsJv+x1bPJn2X1WmV2FMZ49VJIs5mozLHDsVtipqlgtjbhCOOjzpgq7CyZ3fS7TOZh+u74m6erJdnEEKm2Rk5+zDSMk3Lbij0IBTAXsB1QM8fn84JPQok46opNXi3E9CpMNt2DcWM0bALXuIyAFq3EUS8voT2ZftTSiqUNaoaDcK8ahpskhfxNi+J9Ms/yNRZ2+VgkItM5NgO/wM1YteDVj5V7LeopkxX515W828d2tIDAFY9AvQ+eAX59LTPvIjSvlxnI8d8b2atTFcwAMKJiIz+PszAmM5Xr8XDxxVc5ABOBvBTT2X7nR1KnxPw80UpRbDokL5Lr/NmwgUtT2xRL7OMIZ9D3zi4TMbVBT2nm2R1fHQ7G51WEsswK01VP4wWX/Pdle9BMybo7xl2mkXauoLSyfucO964qhQ2Y94NNv0HVj+O/ptRqENpCVzGOF/UZoaMVJewLXsfHdjGPqrqjsKXTBdIWk+E1IHW20TXycHHrHMPUZrFIr5BnbhvywUclJZum/OjjbTDGG4wyou1kKaSuIx1Ed8zk4R1v1icJojbChsrAzhNhqELblNwZyKT1H/5AiB7bU7AIECJPp7qsDfHfgY39S9dkG9HBL4N6a7qaF1XEC4PjuFKsWOgcFVM5D1DvKXuDoHY2eWH73e5x+HxeScAxCye0z9sx/+MMycSkuHzSN89vkA3czt0Ifv1k1S0XH1dFEaFyC3erAd3VM1jFqTLZJBLZ5toTsboZNL25MO208hE0nU8YNqNcGcS41ZAl4Fw4pQmhHXSS1657Loo7gzGaEyQQ5SjT2n+FfnbJzT+lZxZEili7mQ7wd5cEnmV214iSrxeFUJrz+6Snig1TgGNXhZmOXxXYhZB/sOQAAWxZHMfsaSGcNx7v8ET5gixWGgA36KSuhvKq87ed9os6937YBSNRcY5x29g8j7uQnKuajaRINeE/6Zsjn/hsgsLTzw/LKPW7B8Qj6/cK/O8OrrF3HUMzcIyApjhrOuqSVPprku3DXUCy9isxyDgk7AWnaAkgHzt+axq/Bg8M0FsH/vx9r436VCn2Y/xAVe/9wGq9PFNUq5VW7pE0veuqvDW2F4A== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b848ace6-16ba-459a-0da1-08db167f2fb8 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2023 15:52:52.2024 (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: VdqqQ/0cZHpFtQR1/YJyomLxotg1e3Np+fZP/FQ0wXLTdmvyAJ0TPRi/F1cOc7sQtvuTBonVxlj+9PcajN8tPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB8036 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The blamed commit did not properly convert the resource start/end format into the DEFINE_RES_MEM_NAMED() start/length format, resulting in a resource for vsc9959_imdio_res which is much longer than expected: $ cat /proc/iomem 1f8000000-1f815ffff : pcie@1f0000000 1f8140000-1f815ffff : 0000:00:00.5 1f8148030-1f815006f : imdio vs (correct) $ cat /proc/iomem 1f8000000-1f815ffff : pcie@1f0000000 1f8140000-1f815ffff : 0000:00:00.5 1f8148030-1f814803f : imdio Luckily it's not big enough to exceed the size of the parent resource (pci_resource_end(pdev, VSC9959_IMDIO_PCI_BAR)), and it doesn't overlap with anything else that the Linux driver uses currently, so the larger than expected size isn't a practical problem that I can see. Although it is clearly wrong in the /proc/iomem output. Fixes: 044d447a801f ("net: dsa: felix: use DEFINE_RES_MEM_NAMED for resources") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- drivers/net/dsa/ocelot/felix_vsc9959.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 354aa3dbfde7..dddb28984bdf 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -554,7 +554,7 @@ static const char * const vsc9959_resource_names[TARGET_MAX] = { * SGMII/QSGMII MAC PCS can be found. */ static const struct resource vsc9959_imdio_res = - DEFINE_RES_MEM_NAMED(0x8030, 0x8040, "imdio"); + DEFINE_RES_MEM_NAMED(0x8030, 0x10, "imdio"); static const struct reg_field vsc9959_regfields[REGFIELD_MAX] = { [ANA_ADVLEARN_VLAN_CHK] = REG_FIELD(ANA_ADVLEARN, 6, 6), From patchwork Fri Feb 24 15:52:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13151452 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CF97C678D5 for ; Fri, 24 Feb 2023 15:53:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbjBXPxG (ORCPT ); Fri, 24 Feb 2023 10:53:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229568AbjBXPw7 (ORCPT ); Fri, 24 Feb 2023 10:52:59 -0500 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on062b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0e::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BF5B11141 for ; Fri, 24 Feb 2023 07:52:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bhHRwvChAdpqW2Wdu6MANL967Q+fmo6e5isZCuOCZtk74jUzs7VEjXN3wYhE7TNU9bWe1+dgHW0wNgCKlcpfkVbsmsbqhv6fl9ZeK8utQgH+aX1tcaxRE3tfGmsc4ojqCMor8yFWcpeRQuZWvrjWTFSKWAgorJ+Ga0gdhV8ExIV5UaUgo8At/B0vNI6WBVjb9e4YXqEzfoQxhH7KsfEtAoTxI5EPF/8tVoHDP+q7LiD3aXWf754+Bb29ALbjMuCPLN6+f67ivcWmNOqFUIttTbID+hFo2iFAtSCMVHhIP8E1LAhi7qY2wteP/loalPS/KggIT3opvxgRa6Bby23kDg== 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=h6PFJLcjlmrpghec6Cd30eDP2cbP94Ro2lSZQOCns5U=; b=hF02E63cUacWa8GPjuDt4jXs89X5yA8xooh4e7Uxp8Yb0WJJYTdlOuPXjI5/gifjxE5j17AnOMYYu05t6mc4Kl5to1kcanx7i0MDwnmAUKfQr57ipdPZ4SJSsscklxmkwNVhA14PXqQiNOWP6jVj5oSepPOf//UzhqELhyuDmw/JUi8Xz36agCcqQg5Ba5NDMq0Evl5Pc2zBakJxdwWnBA3sOSWTqsFcYAYT+ea7oV4j6Sf/LzmyJMU0c9HFJFEWcKDcVMuxfMN2rWW4D6XDv76E/daiOZqMMVdSFwElpeAqsDtIHWAGxnIF8KY6P/hsMLjGRvjmZCRv+T2s+so02g== 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=h6PFJLcjlmrpghec6Cd30eDP2cbP94Ro2lSZQOCns5U=; b=qFy/+ded8Wmyz7IkLwfQoyNJsuVkz8xaXmO8MvO1Ucqxa0CFMJSYjorZN6c5FQOOrsv0BEEUSLcHNIbOllfO3Nm+UStZI+1ASoa6EqyvkbH5u12gA8kVtiFT26gJqqXuWkZZCa7Dd5Cql81ZshVn03OgV/29UGMDEZ8kDT/eF1Q= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by AM8PR04MB8036.eurprd04.prod.outlook.com (2603:10a6:20b:242::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.24; Fri, 24 Feb 2023 15:52:53 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::29a3:120c:7d42:3ca8]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::29a3:120c:7d42:3ca8%4]) with mapi id 15.20.6134.019; Fri, 24 Feb 2023 15:52:53 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli , Colin Foster , Lee Jones , Maksim Kiselev , Maxim Kochetkov , Heiner Kallweit , Russell King Subject: [PATCH net 3/3] net: mscc: ocelot: fix duplicate driver name error Date: Fri, 24 Feb 2023 17:52:35 +0200 Message-Id: <20230224155235.512695-4-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230224155235.512695-1-vladimir.oltean@nxp.com> References: <20230224155235.512695-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: BE1P281CA0101.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:79::19) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|AM8PR04MB8036:EE_ X-MS-Office365-Filtering-Correlation-Id: ed45bcad-0112-49f5-02b0-08db167f3072 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MWXuJuzayO9EKM1/EQjJeWyF9kAFUfQ+gJAWFW0tuNZq/QJec5NgQE3VbVElzJ/o3r9Idoidpp3XHbRMPIxaqUJ+k8xZWvDQTkqwUcyqbV+2aJrVgYg5Ozh9rj7zIYkClkQav/hVfxnZFxBMko3X/3kTJ4vU1LkAnj5nLjf1F1yed0v7AGsxVKfbFGbNTNQrbMDuTnv/qEghimRajZdSXs/DHkf3OkG4mWT87A0LOywFVZaIqnG8vXygWj/w2Mv0vTuVQ7tw9NPhryk+cetx0sHQzm1wZBKxQsUapyibzaW6DoThVNduljBEXX+ZQamoHTuUVmhZykiSQGrckHt7U77wGaO/1ezDNAD8JqFhVC/QmKO3eHarER5APATe2r7cQqdg4yPHocGfCSYVJ1mifGcQc1jBRgearv42ULbzUMJabR6z5WkQC39D+JSX9TQ7FxTEKahV78/bhuuaEgDEkXtoWyf2+WGu/ckQhUXKWAo6AvEBtWDWEUmuQ73SHxvYCO5ltOP5Ff8bzceTof3Xng3PSwc4XIBQiDd7KlySeZK1aVX4kGnUvS0isqIFZz/79FvHjHBtAUPKYuFXnrgPsgDwbxkeMwuYD938uWgCio+AHZ7iRzBrXqH+hns5FEHkG9dUk2BOWa+i+7XWLj5SE6DY0yhVZzUvzNwuFcWw7zzZPfihK7KZFa79PwW3yPlwDXm6G4tOvLgzg0861yyiyw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(396003)(136003)(366004)(376002)(346002)(39860400002)(451199018)(8936002)(66946007)(6916009)(8676002)(4326008)(316002)(66476007)(54906003)(6486002)(7416002)(2906002)(478600001)(52116002)(41300700001)(66556008)(1076003)(36756003)(26005)(186003)(6666004)(6506007)(6512007)(2616005)(38100700002)(83380400001)(5660300002)(38350700002)(44832011)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PpCCxJ2nJij1ql0PofMFxxgtHlb1kLB+XKrQ63z4FrolaBzuFo+Qd4FpytDJk70EEwra97cwMpTFY0pG0US7tKl3N787nXTbgQtjXDUGt0gH6vhYzRJfTuFLdWhMIk+SEZ0CBGrXHZX6bExiWRLfbFznJKqxcpgRNOoCq3kFe9cfUBl4YxE8jlHefcnuEUyToqTOjl9zXNFmw2UaW47Q2jN+SVAuiUqfv6uLWT3EhyeR88ZCbgVlB/hzDh2IBbaNblWsv1rd3X1elS3dWZ1JQigt1fdl9zuxLj2ytg/9U+pZiEk75o91GMVeGUGCTJP5BOq+iU79kkJ6qWWJEUooNjdeEN536vWS1vGtyBX68Ig8RT8/dqEwT/ptRr4xkk/wJoaZrnD6MCoZbyQs3mvQvcDLPof9XWcMrEgDbwTyMK0prDhkT4cTjJ9r72u93vV5aT+QiXrAMURqfxc/O3JwAhw0U+qC5tbgY/texGOX6SaxBQhZjKRrXuoz1VRWBU8M5/aeOjp7BPzTtPj3+NU049IlCegjVfHHWpCjADFBHUCXQfspZj0noTYWEs/VXy4K8walJbfEjV1RVWUnjbTM9Iq+ja38W3C1/MHu+H+8KbNoNVJmSD6C9bzDFxW/eoxBENhgHqMOrIcbMWIclCA4mNGNKSe7o1HElAAl1XtIegliIel0X2oYKcRUZJM8pInHYyDaV3PSH0Ua6aHy/Vr2CrwWHW11Jlt4513KozTU/9c2ndO/8fzI57cIez0ptr1Zaq+SKik6tZel4Y5IXEx7IKcB/L9yHUWbps7xB2FssKp3bNMUdGHSYc9sVMwXXBLT/ZZoY/R5yjv3G1XxPTpKqRmfM8+20AwN59WTzIqGcd6d8PgtjnVQCICH2uZAvtsP6JoeDh7RLlUScva9eLq9J9v+loSoJnpOEhqHXKkfNzfvlBEn+w6JmZVc30jcJJVrw6ojDEPcPCaSGWJBeTz5Kr66YtRWj7ZQBZ9sklthDp7D4WGb7CZjC8Yh/Z1Ltfgc3kljCF4Vm6Phobd2+C4CIgYUKMIHw2SCchBO8VtSCWOciKK1ozTanQ9c7TA7UG4zmkLbbJ17vl6sz6tVo99xPAmb3svonRwW+87UdOBqSxZcp3T7rxNUTTG7+Yl/VwxlW+4LYVKqdmv46GK6BA0lgxcCVfNZHAKSqNMBN5aZXvA+3zHnw9HhfH5IOfj2Vn6NZ8c7Bqw4bSMBHvRpK6WZO/noPnH+tp5DLcEW4wDb5izpkVwuaseddcmc83VqUBiLqw5qo1I6MuFZhBi30F768abs2r2+fmB0m2s9WmE9yqVhjv2Owa10Wc5MGhhNljheNzSyECeRlqECGDR6LJHca123FiHKiAIIAQ6uXYD29FXY/YNae+5ItVJRkdlrSlvRqwdy/iVOCg6gC1cX2/GMyGlhiIMliXuyfG0QsHPlfXeugdcPSWg67sivfFs4IgKJEmQexKI39DgcgmcIFcRFh2YilaxkP6YRex/Ah5BXZ0Ab6Ui85ei9Mf1k2CYO1ebVLOglktsoLgvoLQ2dEw7qIw0Ka+ty8xbWHrR7sGYjU5XCDWei+ZhkSM1G+MoCgVt0Z8AZb+ECQv69nA/Qi1USbg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed45bcad-0112-49f5-02b0-08db167f3072 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2023 15:52:53.4211 (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: f4y8+E2uc+sjiRRSJJeDHROjaAH651FF6+keUHK18BxDiH81IFvXc6nCIMJSaXzzvHZAfH31Qj15Ms/VvrVGdA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB8036 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org When compiling a kernel which has both CONFIG_NET_DSA_MSCC_OCELOT_EXT and CONFIG_MSCC_OCELOT_SWITCH enabled, the following error message will be printed: [ 5.266588] Error: Driver 'ocelot-switch' is already registered, aborting... Rename the ocelot_ext.c driver to "ocelot-ext-switch" to avoid the name duplication, and update the mfd_cell entry for its resources. Fixes: 3d7316ac81ac ("net: dsa: ocelot: add external ocelot switch control") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Acked-by: Lee Jones --- drivers/mfd/ocelot-core.c | 2 +- drivers/net/dsa/ocelot/ocelot_ext.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/ocelot-core.c b/drivers/mfd/ocelot-core.c index b0ff05c1759f..e1772ff00cad 100644 --- a/drivers/mfd/ocelot-core.c +++ b/drivers/mfd/ocelot-core.c @@ -177,7 +177,7 @@ static const struct mfd_cell vsc7512_devs[] = { .num_resources = ARRAY_SIZE(vsc7512_miim1_resources), .resources = vsc7512_miim1_resources, }, { - .name = "ocelot-switch", + .name = "ocelot-ext-switch", .of_compatible = "mscc,vsc7512-switch", .num_resources = ARRAY_SIZE(vsc7512_switch_resources), .resources = vsc7512_switch_resources, diff --git a/drivers/net/dsa/ocelot/ocelot_ext.c b/drivers/net/dsa/ocelot/ocelot_ext.c index 14efa6387bd7..52b41db63a28 100644 --- a/drivers/net/dsa/ocelot/ocelot_ext.c +++ b/drivers/net/dsa/ocelot/ocelot_ext.c @@ -149,7 +149,7 @@ MODULE_DEVICE_TABLE(of, ocelot_ext_switch_of_match); static struct platform_driver ocelot_ext_switch_driver = { .driver = { - .name = "ocelot-switch", + .name = "ocelot-ext-switch", .of_match_table = of_match_ptr(ocelot_ext_switch_of_match), }, .probe = ocelot_ext_probe,