diff options
author | Marcin Wojtas <mw@semihalf.com> | 2021-06-25 12:38:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-25 11:46:29 -0700 |
commit | ac53c26433b51f1835ce5a935970e427d83e3ec5 (patch) | |
tree | cdbef2f33dc8a68365c9bbc569d49d330c743002 /include | |
parent | f92e1869d74e1acc6551256eb084a1c14a054e19 (diff) |
net: mdiobus: withdraw fwnode_mdbiobus_register
The newly implemented fwnode_mdbiobus_register turned out to be
problematic - in case the fwnode_/of_/acpi_mdio are built as
modules, a dependency cycle can be observed during the depmod phase of
modules_install, eg.:
depmod: ERROR: Cycle detected: fwnode_mdio -> of_mdio -> fwnode_mdio
depmod: ERROR: Found 2 modules in dependency cycles!
OR:
depmod: ERROR: Cycle detected: acpi_mdio -> fwnode_mdio -> acpi_mdio
depmod: ERROR: Found 2 modules in dependency cycles!
A possible solution could be to rework fwnode_mdiobus_register,
so that to merge the contents of acpi_mdiobus_register and
of_mdiobus_register. However feasible, such change would
be very intrusive and affect huge amount of the of_mdiobus_register
users.
Since there are currently 2 users of ACPI and MDIO
(xgmac_mdio and mvmdio), withdraw the fwnode_mdbiobus_register
and roll back to a simple 'if' condition in affected drivers.
Fixes: 62a6ef6a996f ("net: mdiobus: Introduce fwnode_mdbiobus_register()")
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fwnode_mdio.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/include/linux/fwnode_mdio.h b/include/linux/fwnode_mdio.h index f62817c23137..faf603c48c86 100644 --- a/include/linux/fwnode_mdio.h +++ b/include/linux/fwnode_mdio.h @@ -16,7 +16,6 @@ int fwnode_mdiobus_phy_device_register(struct mii_bus *mdio, int fwnode_mdiobus_register_phy(struct mii_bus *bus, struct fwnode_handle *child, u32 addr); -int fwnode_mdiobus_register(struct mii_bus *bus, struct fwnode_handle *fwnode); #else /* CONFIG_FWNODE_MDIO */ int fwnode_mdiobus_phy_device_register(struct mii_bus *mdio, struct phy_device *phy, @@ -31,17 +30,6 @@ static inline int fwnode_mdiobus_register_phy(struct mii_bus *bus, { return -EINVAL; } - -static inline int fwnode_mdiobus_register(struct mii_bus *bus, - struct fwnode_handle *fwnode) -{ - /* - * Fall back to mdiobus_register() function to register a bus. - * This way, we don't have to keep compat bits around in drivers. - */ - - return mdiobus_register(bus); -} #endif #endif /* __LINUX_FWNODE_MDIO_H */ |