Patch "net: mdiobus: Set FWNODE_FLAG_NEEDS_CHILD_BOUND_ON_ADD for mdiobus parents" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: mdiobus: Set FWNODE_FLAG_NEEDS_CHILD_BOUND_ON_ADD for mdiobus parents

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-mdiobus-set-fwnode_flag_needs_child_bound_on_add.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 44a2a3669d5c4c69b0bbe8d029f1b3148f708ed2
Author: Saravana Kannan <saravanak@xxxxxxxxxx>
Date:   Wed Sep 15 10:09:39 2021 -0700

    net: mdiobus: Set FWNODE_FLAG_NEEDS_CHILD_BOUND_ON_ADD for mdiobus parents
    
    [ Upstream commit 04f41c68f18886aea5afc68be945e7195ea1d598 ]
    
    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@xxxxxxx/#t
    
    Fixes: ea718c699055 ("Revert "Revert "driver core: Set fw_devlink=on by default""")
    Suggested-by: Andrew Lunn <andrew@xxxxxxx>
    Signed-off-by: Saravana Kannan <saravanak@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210915170940.617415-4-saravanak@xxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 53f034fc2ef7..ee8313a4ac71 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -525,6 +525,10 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner)
 	    NULL == bus->read || NULL == bus->write)
 		return -EINVAL;
 
+	if (bus->parent && bus->parent->of_node)
+		bus->parent->of_node->fwnode.flags |=
+					FWNODE_FLAG_NEEDS_CHILD_BOUND_ON_ADD;
+
 	BUG_ON(bus->state != MDIOBUS_ALLOCATED &&
 	       bus->state != MDIOBUS_UNREGISTERED);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux