From nobody Sat Sep 21 06:51:35 2024 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 89BD6C004D4 for ; Wed, 18 Jan 2023 10:56:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229995AbjARK4N (ORCPT ); Wed, 18 Jan 2023 05:56:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230002AbjARKxB (ORCPT ); Wed, 18 Jan 2023 05:53:01 -0500 Received: from mail.3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 926C888744; Wed, 18 Jan 2023 02:01:48 -0800 (PST) Received: from mwalle01.sab.local (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 403D11696; Wed, 18 Jan 2023 11:01:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1674036106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mwRgH1gwGvw1Zmyg8lEWyK1RUMWeRROk6pcDON7Mutc=; b=sL7klO901P68+Qf+oOucnTQ8o7LJqALT6i87nmTOHVWPOS9ZYlXtiknTB/H8z//VkltPnb UztiV9XdRDU5w++sTB8S4n9hEz4uwMs5H6JSVhAdg07jAhK2O5B0+DDv56MqvpmlTPTOVG Bdnqi9+Oi61wYHTPU4EWyb81JqFpSw1jtqsaaDKW6TbkpXPTRDfdMPyt37OO1t2W/dCSta tJAhIrZ68UvwOcCHU3CPygVZ/L2zVoGL6wP2g/NfT+DzQe+VOMXSxGDsGfaF5qdRk6p3t9 2kYLiT8zedHyBMw554J6/N5RiVOWfwIwYvnxaCY8VPMRyDTl2QL2tXiB4bxLLg== From: Michael Walle Date: Wed, 18 Jan 2023 11:01:38 +0100 Subject: [PATCH net-next v2 4/6] net: mdio: scan bus based on bus capabilities for C22 and C45 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230116-net-next-remove-probe-capabilities-v2-4-15513b05e1f4@walle.cc> References: <20230116-net-next-remove-probe-capabilities-v2-0-15513b05e1f4@walle.cc> In-Reply-To: <20230116-net-next-remove-probe-capabilities-v2-0-15513b05e1f4@walle.cc> To: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , Bryan Whitehead , UNGLinuxDriver@microchip.com, Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Joel Stanley , Andrew Jeffery Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-aspeed@lists.ozlabs.org, Andrew Lunn , Michael Walle , Jesse Brandeburg X-Mailer: b4 0.11.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrew Lunn Now that all MDIO bus drivers which set probe_capabilities to MDIOBUS_C22_C45 have been converted to use the name API for C45 transactions, perform the scanning of the bus based on which methods the bus provides. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Reviewed-by: Jesse Brandeburg --- drivers/net/phy/mdio_bus.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index a664eeb1868d..5b2f48c09a6a 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -711,9 +711,7 @@ int __mdiobus_register(struct mii_bus *bus, struct modu= le *owner) goto error_reset_gpiod; } =20 - if (bus->probe_capabilities =3D=3D MDIOBUS_NO_CAP || - bus->probe_capabilities =3D=3D MDIOBUS_C22 || - bus->probe_capabilities =3D=3D MDIOBUS_C22_C45) { + if (bus->read) { err =3D mdiobus_scan_bus_c22(bus); if (err) goto error; @@ -721,9 +719,7 @@ int __mdiobus_register(struct mii_bus *bus, struct modu= le *owner) =20 prevent_c45_scan =3D mdiobus_prevent_c45_scan(bus); =20 - if (!prevent_c45_scan && - (bus->probe_capabilities =3D=3D MDIOBUS_C45 || - bus->probe_capabilities =3D=3D MDIOBUS_C22_C45)) { + if (!prevent_c45_scan && bus->read_c45) { err =3D mdiobus_scan_bus_c45(bus); if (err) goto error; --=20 2.30.2