]> git.baikalelectronics.ru Git - kernel.git/commit
net: mdiobus: Set FWNODE_FLAG_NEEDS_CHILD_BOUND_ON_ADD for mdiobus parents
authorSaravana Kannan <saravanak@google.com>
Wed, 15 Sep 2021 17:09:39 +0000 (10:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Sep 2021 17:26:54 +0000 (19:26 +0200)
commit2e0d2e04c9b20f51caffe0e4881f747c5f3b34a0
treed8ada1d1717246c2f797559b269e900628fb5405
parent9c6771d97e1c8592cfc28c6e86f71f827d5b691f
net: mdiobus: Set FWNODE_FLAG_NEEDS_CHILD_BOUND_ON_ADD for mdiobus parents

There are many instances of PHYs that depend on a switch to supply a
resource (Eg: interrupts). Switches also expects the PHYs to be probed
by their specific drivers as soon as they are added. If that doesn't
happen, then the switch would force the use of generic PHY drivers for
the PHY even if the PHY might have specific driver available.

fw_devlink=on by design can cause delayed probes of PHY. To avoid, this
we need to set the FWNODE_FLAG_NEEDS_CHILD_BOUND_ON_ADD for the switch's
fwnode before the PHYs are added. The most generic way to do this is to
set this flag for the parent of MDIO busses which is typically the
switch.

For more context:
https://lore.kernel.org/lkml/YTll0i6Rz3WAAYzs@lunn.ch/#t

Fixes: 53c7a47ae002 ("Revert "Revert "driver core: Set fw_devlink=on by default""")
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20210915170940.617415-4-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/mdio_bus.c