Commit 3ef4a8c8 authored by Paolo Abeni's avatar Paolo Abeni
Browse files

Merge branch 'net-phy-remove-probe_capabilities'

Michael Walle says:

====================
net: phy: Remove probe_capabilities

With all the drivers which used .probe_capabilities converted to the
new c45 MDIO access methods, we can now decide based upon these whether
a bus driver supports c45 and we can get rid of the not widely used
probe_capabilites.

Unfortunately, due to a now broader support of c45 scans, this will
trigger a bug on some boards with a (c22-only) Micrel PHY. These PHYs
don't ignore c45 accesses correctly, thinking they are addressed
themselves and distrupt the MDIO access. To avoid this, a blacklist
for c45 scans is introduced.
====================

Link: https://lore.kernel.org/r/20230116-net-next-remove-probe-capabilities-v2-0-15513b05e1f4@walle.cc


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents c84f433e da099a7f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -523,7 +523,6 @@ static int adin1110_register_mdiobus(struct adin1110_priv *priv,
	mii_bus->priv = priv;
	mii_bus->parent = dev;
	mii_bus->phy_mask = ~((u32)GENMASK(2, 0));
	mii_bus->probe_capabilities = MDIOBUS_C22;
	snprintf(mii_bus->id, MII_BUS_ID_SIZE, "%s", dev_name(dev));

	ret = devm_mdiobus_register(dev, mii_bus);
+0 −1
Original line number Diff line number Diff line
@@ -397,7 +397,6 @@ static int xgmac_mdio_probe(struct platform_device *pdev)
	bus->read_c45 = xgmac_mdio_read_c45;
	bus->write_c45 = xgmac_mdio_write_c45;
	bus->parent = &pdev->dev;
	bus->probe_capabilities = MDIOBUS_C22_C45;
	snprintf(bus->id, MII_BUS_ID_SIZE, "%pa", &res->start);

	priv = bus->priv;
+1 −1
Original line number Diff line number Diff line
@@ -965,7 +965,7 @@ static int pxa168_init_phy(struct net_device *dev)
	if (dev->phydev)
		return 0;

	phy = mdiobus_scan(pep->smi_bus, pep->phy_addr);
	phy = mdiobus_scan_c22(pep->smi_bus, pep->phy_addr);
	if (IS_ERR(phy))
		return PTR_ERR(phy);

+0 −1
Original line number Diff line number Diff line
@@ -814,7 +814,6 @@ static int mtk_mdio_init(struct mtk_eth *eth)
	eth->mii_bus->write = mtk_mdio_write_c22;
	eth->mii_bus->read_c45 = mtk_mdio_read_c45;
	eth->mii_bus->write_c45 = mtk_mdio_write_c45;
	eth->mii_bus->probe_capabilities = MDIOBUS_C22_C45;
	eth->mii_bus->priv = eth;
	eth->mii_bus->parent = eth->dev;

+0 −2
Original line number Diff line number Diff line
@@ -3302,7 +3302,6 @@ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
			lan743x_csr_write(adapter, SGMII_CTL, sgmii_ctl);
			netif_dbg(adapter, drv, adapter->netdev,
				  "SGMII operation\n");
			adapter->mdiobus->probe_capabilities = MDIOBUS_C22_C45;
			adapter->mdiobus->read = lan743x_mdiobus_read_c22;
			adapter->mdiobus->write = lan743x_mdiobus_write_c22;
			adapter->mdiobus->read_c45 = lan743x_mdiobus_read_c45;
@@ -3318,7 +3317,6 @@ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
			netif_dbg(adapter, drv, adapter->netdev,
				  "RGMII operation\n");
			// Only C22 support when RGMII I/F
			adapter->mdiobus->probe_capabilities = MDIOBUS_C22;
			adapter->mdiobus->read = lan743x_mdiobus_read_c22;
			adapter->mdiobus->write = lan743x_mdiobus_write_c22;
			adapter->mdiobus->name = "lan743x-mdiobus";
Loading