Patch "net: dsa: dsa_slave_phy_connect(): extend phy's flags with port specific phy flags" has been added to the 5.10-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: dsa: dsa_slave_phy_connect(): extend phy's flags with port specific phy flags

to the 5.10-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-dsa-dsa_slave_phy_connect-extend-phy-s-flags-wit.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 35bbe8f03d07ed4fc7fd998af08ffd113a0066cb
Author: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
Date:   Mon Jun 14 06:31:24 2021 +0200

    net: dsa: dsa_slave_phy_connect(): extend phy's flags with port specific phy flags
    
    [ Upstream commit c916e8e1ea724db0f7bae36c11aaadc631226321 ]
    
    The current get_phy_flags() is only processed when we connect to a PHY
    via a designed phy-handle property via phylink_of_phy_connect(), but if
    we fallback on the internal MDIO bus created by a switch and take the
    dsa_slave_phy_connect() path then we would not be processing that flag
    and using it at PHY connection time.
    
    Suggested-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
    Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 9281c9c6a253..3d72b10cf469 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1672,7 +1672,8 @@ static void dsa_slave_phylink_fixed_state(struct phylink_config *config,
 }
 
 /* slave device setup *******************************************************/
-static int dsa_slave_phy_connect(struct net_device *slave_dev, int addr)
+static int dsa_slave_phy_connect(struct net_device *slave_dev, int addr,
+				 u32 flags)
 {
 	struct dsa_port *dp = dsa_slave_to_port(slave_dev);
 	struct dsa_switch *ds = dp->ds;
@@ -1683,6 +1684,8 @@ static int dsa_slave_phy_connect(struct net_device *slave_dev, int addr)
 		return -ENODEV;
 	}
 
+	slave_dev->phydev->dev_flags |= flags;
+
 	return phylink_connect_phy(dp->pl, slave_dev->phydev);
 }
 
@@ -1727,7 +1730,7 @@ static int dsa_slave_phy_setup(struct net_device *slave_dev)
 		/* We could not connect to a designated PHY or SFP, so try to
 		 * use the switch internal MDIO bus instead
 		 */
-		ret = dsa_slave_phy_connect(slave_dev, dp->index);
+		ret = dsa_slave_phy_connect(slave_dev, dp->index, phy_flags);
 		if (ret) {
 			netdev_err(slave_dev,
 				   "failed to connect to port %d: %d\n",



[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