From patchwork Thu Jan 4 14:00:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13511141 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2054.outbound.protection.outlook.com [40.107.249.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2D33224CE for ; Thu, 4 Jan 2024 14:01:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="gKK2+jOg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lhjZklwXSO5mPFVtVtqEdP52ufigi6JR5I9wkBnmoOL5KKhZN0Gdxj64A3tPg1ANpJerJNC7J5qt3i2SWrrtA26dlCJhyslhEoqqe4WvE8fD3eveWR8hj5QUsx5WRDrrrk2EqYUQ+bCktbGfBHNznsPBZhebjDzWvabXlh3O684q9eQDLuLA4sD8qW/sFiUuq/ebM1OTAQ/w+6l4dFNgIwO/tnBmTd06urrpQ/6/vKa94nuJgSVQ8Tqf3cgb+UjSAbyUlUVZIQu2vidyTKZgembRXHXgXZzdMTxqMtkj0GIOfgtTAa+oRbfy81kZS2NZbKhdmmcOTrHW4i5KBJQNNQ== 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=zbGAb61AlNP2JUoAroyRrCmsCkH4jiMQVdEHM0ymHdk=; b=nfl+Z8zNkRXybSAb6ecE1Mhoznj+t59CpmYMJA1h9NUK/L2kFd3oTBRKuBEqItTyJ1o0OiyFdENMgT1NM7HG4oCq7buCntd99ZFIgintdqKNWDEuY/7LNPMIdTQTNngTaQtiC4fyTyMmAbZNzJ38Maz+eUbN4TPpLwLkAw+3vp2GsGBk5k9hCBV9ENwyMaCQmQDxsrWbsQypK3ALN4F6RnHnmHMfdPiKpVqIDT1D7wMCLfKH6qxKDkW5FMUDUD0vY/IVkizt6TOfJPp5GZugjpWIHLda652rT43svcZWeCLoP9Ybd9NSy5owL6mXYf3BizH489q1fW6IJsw1MA7Usw== 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=zbGAb61AlNP2JUoAroyRrCmsCkH4jiMQVdEHM0ymHdk=; b=gKK2+jOg9JFfGKgnuGv5cw48MO1cz9+z4uEzlnptb4SuRCPqmNEaC7eEues28HvlztLG5n00LYpkv9QILmo8VcxsyUIbKineXl9lbWO+5ewZwet2O0sVXcVIY++2IPThfKmfQTqUm1tnjqGHm1LXixVzJyfoxsRmlPjU5t05vjs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB7374.eurprd04.prod.outlook.com (2603:10a6:800:1ac::11) by PAXPR04MB8176.eurprd04.prod.outlook.com (2603:10a6:102:1c9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.14; Thu, 4 Jan 2024 14:01:13 +0000 Received: from VE1PR04MB7374.eurprd04.prod.outlook.com ([fe80::901f:7d8d:f07c:e976]) by VE1PR04MB7374.eurprd04.prod.outlook.com ([fe80::901f:7d8d:f07c:e976%3]) with mapi id 15.20.7159.013; Thu, 4 Jan 2024 14:01:13 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Florian Fainelli , Luiz Angelo Daros de Luca , =?utf-8?q?Alvin_=C5=A0iprag?= =?utf-8?q?a?= , Linus Walleij , Florian Fainelli , Hauke Mehrtens , Christian Marangi , =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= Subject: [PATCH net-next 00/10] ds->user_mii_bus cleanup (part 1) Date: Thu, 4 Jan 2024 16:00:27 +0200 Message-Id: <20240104140037.374166-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: VI1PR04CA0063.eurprd04.prod.outlook.com (2603:10a6:802:2::34) To VE1PR04MB7374.eurprd04.prod.outlook.com (2603:10a6:800:1ac::11) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB7374:EE_|PAXPR04MB8176:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d0910b1-f5cc-4e93-6a77-08dc0d2d9c8b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ocdi7F/5H79ED0CnrS7LMZ8Rv8aqJlA4Eek9cREJ3ZymCQ7XqI5V/ElT6sJcITidisAdNlyRTXFfjL38OHpl89W59X1ciJ0kx2rYOSZzoV4PMWjfZmgd5i3CXYu+RfAAsDot91JO2fXmP/bu61l9tHV6P6owqOSV2sFx9fjGg+V9mqOAeyeYgZHUR7nXXzY+VV4p0sxyh0sDiUg5PMUBUBoxIz/pOlE8pqrojD3PjP6x4qus8o3fV0DSbQCy/f0FAYeCX5zpfX+GP0jFU0qnuBhkDGoc26OMQTOjOUvnNrnLKUix/1S/LxUaJ9+nqrmuraOD8CfMXUXpDX2jCZQa5bPppJWrelClHh1hyF5Q4Mh7rpK57egpjnwZMcxWk2ZWRFy7qvxFvt3gD6wijugYK4fXoZL6BRFax3T5Sag9jJRzAQPWVUvkqz7FKa6/NW6Z95y+gHoeaidZDDMk6RnZsNcO1lZ+YypdqvK5AG135si8Iv8H02OgtpIsa0xdXut6pPYnrJZLLnaRClHwekRIfmxR7kzuXKCnSa+mHufdD6FpZYWpa7KFf+q4/TN6KhzSbHl6Umk2pkpdwVw1ObiyFtUggKTcibTZPkulKyelK94= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB7374.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39860400002)(346002)(376002)(366004)(136003)(230922051799003)(451199024)(186009)(64100799003)(1800799012)(7416002)(41300700001)(26005)(2616005)(83380400001)(38100700002)(1076003)(8936002)(8676002)(54906003)(316002)(4326008)(6916009)(2906002)(5660300002)(44832011)(6666004)(66476007)(6506007)(6512007)(52116002)(66946007)(478600001)(66556008)(6486002)(86362001)(38350700005)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Fsnla/F+UjXvOb+IIHvIemtJ6e8Wf9dlS5X1abh3yqmg7kVtdWCP+RJWAFEfA0pOkx2zm7vzRf49XS8pAF84lmzN47eyzYXYaNNmFBfEob0NWzBmMTyE9Ru740AyLKXP6HUGCZYc96WhpwIUoaaWpErPTEiXTPHGl/42cosUwI2svqd9OlSVsXqSCnRxDFiHfmXEGBpEaUmyCCYXxOD+b9J0zCcxmplCRr8+6+rwiptOMlU29XCwD17ehLmyi85oNs1RQ55K6GA2fkpPsSFZJ//c5N4YkeT2eq0JNDpvzz8nj7m/vioOvesnbWU9DirSuFdJ4gWKFKUyoG/yXKaZuF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tPyeV6luQDvUGMtaoa+BqlvJufQb3yCv/mk3YLfMBpkHOd9kDc/fmF3abaEYrfC+LIGVKB7IJXm5EqDlrJi0PW3abwc9YLH0YGoQFd4AbQ4ZaGlgNrtV4kxIUNBj3jTD2VQtjglrI40JfLmW7D6YA/YRuD0XLh2zMyuFBei2O4kJ1WKOIs1zQg7fSiClw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d0910b1-f5cc-4e93-6a77-08dc0d2d9c8b X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB7374.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2024 14:01:13.2572 (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: tmItLa4xzTRAhB4tEqLe54ag676qen+19uerXwt419gK9/ZTXkSPSg/kJIsd3uDiFKfreWWn/BaGsp1UEcaZ0Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8176 X-Patchwork-Delegate: kuba@kernel.org There are some drivers which assign ds->user_mii_bus when they don't really need its specific functionality, aka non-OF based dsa_user_phy_connect(). There was some confusion regarding the fact that yes, this is why ds->user_mii_bus really exists, so I've started a cleanup series which aims to eliminate the usage of ds->user_mii_bus from drivers when there is nothing to gain from it. Today's drivers are lantiq_gswip, qca8k and bcm_sf2. The work is not done here, but a "part 2" may or may not come, depending on other priorities. All patches were only compile-tested. Vladimir Oltean (10): net: dsa: lantiq_gswip: delete irrelevant use of ds->phys_mii_mask net: dsa: lantiq_gswip: use devres for internal MDIO bus, not ds->user_mii_bus net: dsa: lantiq_gswip: ignore MDIO buses disabled in OF net: dsa: qca8k: put MDIO bus OF node on qca8k_mdio_register() failure net: dsa: qca8k: skip MDIO bus creation if its OF node has status = "disabled" net: dsa: qca8k: assign ds->user_mii_bus only for the non-OF case net: dsa: qca8k: consolidate calls to a single devm_of_mdiobus_register() net: dsa: qca8k: use "dev" consistently within qca8k_mdio_register() net: dsa: bcm_sf2: stop assigning an OF node to the ds->user_mii_bus net: dsa: bcm_sf2: drop priv->master_mii_dn drivers/net/dsa/bcm_sf2.c | 7 ++-- drivers/net/dsa/bcm_sf2.h | 1 - drivers/net/dsa/lantiq_gswip.c | 72 ++++++++++++++------------------ drivers/net/dsa/qca/qca8k-8xxx.c | 47 +++++++++++++-------- drivers/net/dsa/qca/qca8k-leds.c | 4 +- drivers/net/dsa/qca/qca8k.h | 1 + 6 files changed, 68 insertions(+), 64 deletions(-)