[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230116-net-next-remove-probe-capabilities-v1-4-5aa29738a023@walle.cc>
Date: Mon, 16 Jan 2023 13:55:16 +0100
From: Michael Walle <michael@...le.cc>
To: Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Felix Fietkau <nbd@....name>,
John Crispin <john@...ozen.org>,
Sean Wang <sean.wang@...iatek.com>,
Mark Lee <Mark-MC.Lee@...iatek.com>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Bryan Whitehead <bryan.whitehead@...rochip.com>,
UNGLinuxDriver@...rochip.com,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Joel Stanley <joel@....id.au>, Andrew Jeffery <andrew@...id.au>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
linux-stm32@...md-mailman.stormreply.com,
linux-aspeed@...ts.ozlabs.org, Andrew Lunn <andrew@...n.ch>,
Michael Walle <michael@...le.cc>
Subject: [PATCH net-next 4/6] net: mdio: scan bus based on bus capabilities
for C22 and C45
From: Andrew Lunn <andrew@...n.ch>
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 <andrew@...n.ch>
Signed-off-by: Michael Walle <michael@...le.cc>
---
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 f173c91842e0..34790e601cb1 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -710,9 +710,7 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner)
goto error_reset_gpiod;
}
- if (bus->probe_capabilities == MDIOBUS_NO_CAP ||
- bus->probe_capabilities == MDIOBUS_C22 ||
- bus->probe_capabilities == MDIOBUS_C22_C45) {
+ if (bus->read) {
err = mdiobus_scan_bus_c22(bus);
if (err)
goto error;
@@ -720,9 +718,7 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner)
prevent_c45_scan = mdiobus_prevent_c45_scan(bus);
- if (!prevent_c45_scan &&
- (bus->probe_capabilities == MDIOBUS_C45 ||
- bus->probe_capabilities == MDIOBUS_C22_C45)) {
+ if (!prevent_c45_scan && bus->read_c45) {
err = mdiobus_scan_bus_c45(bus);
if (err)
goto error;
--
2.30.2
Powered by blists - more mailing lists