]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
net: mdio-mux: Handle -EPROBE_DEFER correctly
authorSaravana Kannan <saravanak@google.com>
Wed, 18 Aug 2021 03:38:03 +0000 (20:38 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 24 Sep 2021 10:27:49 +0000 (12:27 +0200)
commit2a45f48c9b8a363d9e4c077c9cd2e98f0b8ff865
tree793460ca8d002919e7f399379da585bf77a8eb63
parent2c9aff9b06af32a3aeaee93c98dd94abe3e8f4c6
net: mdio-mux: Handle -EPROBE_DEFER correctly

BugLink: https://bugs.launchpad.net/bugs/1944212
[ Upstream commit 7bd0cef5dac685f09ef8b0b2a7748ff42d284dc7 ]

When registering mdiobus children, if we get an -EPROBE_DEFER, we shouldn't
ignore it and continue registering the rest of the mdiobus children. This
would permanently prevent the deferring child mdiobus from working instead
of reattempting it in the future. So, if a child mdiobus needs to be
reattempted in the future, defer the entire mdio-mux initialization.

This fixes the issue where PHYs sitting under the mdio-mux aren't
initialized correctly if the PHY's interrupt controller is not yet ready
when the mdio-mux is being probed. Additional context in the link below.

Fixes: 0ca2997d1452 ("netdev/of/phy: Add MDIO bus multiplexer support.")
Link: https://lore.kernel.org/lkml/CAGETcx95kHrv8wA-O+-JtfH7H9biJEGJtijuPVN0V5dUKUAB3A@mail.gmail.com/#t
Signed-off-by: Saravana Kannan <saravanak@google.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Marc Zyngier <maz@kernel.org>
Tested-by: Marc Zyngier <maz@kernel.org>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/net/phy/mdio-mux.c