net: phy: Remove probe_capabilities
authorAndrew Lunn <andrew@lunn.ch>
Wed, 18 Jan 2023 10:01:40 +0000 (11:01 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 19 Jan 2023 15:23:19 +0000 (16:23 +0100)
Deciding if to probe of PHYs using C45 is now determine by if the bus
provides the C45 read method. This makes probe_capabilities redundant
so remove it.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/adi/adin1110.c
drivers/net/ethernet/freescale/xgmac_mdio.c
drivers/net/ethernet/mediatek/mtk_eth_soc.c
drivers/net/ethernet/microchip/lan743x_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
drivers/net/mdio/mdio-aspeed.c
include/linux/phy.h

index 0805f249fff29204611f5059873e7e13b52f0084..25f55756681d6048492e64af183bbce4a0f6e81e 100644 (file)
@@ -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);
index 8b5a4cd8ff08a4de22a8efdcab79d38e11e6ca8e..a13b4ba4d6e160913674fe242901b0e4ba42ebba 100644 (file)
@@ -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;
index 75bbb1e7766c151e53770070d80b8480e873743a..801deac58bf71e3ff7623c2cd80c80645c62628f 100644 (file)
@@ -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;
 
index b5add1c5fa064e7389da2264010ae8c1d976d93b..7e0871b631e4fcb792cfc74b08c2fd1df2946e41 100644 (file)
@@ -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";
index d2cb22f49ce529533718bf9b66c7b3a440fc1b21..21aaa2730ac8ae65cd02633288e0127b1754c32c 100644 (file)
@@ -553,9 +553,6 @@ int stmmac_mdio_register(struct net_device *ndev)
 
        new_bus->name = "stmmac";
 
-       if (priv->plat->has_gmac4)
-               new_bus->probe_capabilities = MDIOBUS_C22_C45;
-
        if (priv->plat->has_xgmac) {
                new_bus->read = &stmmac_xgmac2_mdio_read_c22;
                new_bus->write = &stmmac_xgmac2_mdio_write_c22;
index 2f4bbda5e56c5f42b3162b5b3eb9df05c1a93e58..c727103c8b0575a0bbcc5fc2de69f097123b25e4 100644 (file)
@@ -164,7 +164,6 @@ static int aspeed_mdio_probe(struct platform_device *pdev)
        bus->write = aspeed_mdio_write_c22;
        bus->read_c45 = aspeed_mdio_read_c45;
        bus->write_c45 = aspeed_mdio_write_c45;
-       bus->probe_capabilities = MDIOBUS_C22_C45;
 
        rc = of_mdiobus_register(bus, pdev->dev.of_node);
        if (rc) {
index fceaac0fb31928072ce995f902b86e94a5c813bc..fbeba4fee8d4d13295c8eb52bc32c60e9b052ddb 100644 (file)
@@ -419,14 +419,6 @@ struct mii_bus {
        /** @reset_gpiod: Reset GPIO descriptor pointer */
        struct gpio_desc *reset_gpiod;
 
-       /** @probe_capabilities: bus capabilities, used for probing */
-       enum {
-               MDIOBUS_NO_CAP = 0,
-               MDIOBUS_C22,
-               MDIOBUS_C45,
-               MDIOBUS_C22_C45,
-       } probe_capabilities;
-
        /** @shared_lock: protect access to the shared element */
        struct mutex shared_lock;