Patch "net: dsa: bcm_sf2: Qualify phydev->dev_flags based on port" 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: bcm_sf2: Qualify phydev->dev_flags based on port

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-bcm_sf2-qualify-phydev-dev_flags-based-on-po.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 b4feddbce9c702e8183f9a6c4fbdf99fc2db9d93
Author: Florian Fainelli <f.fainelli@xxxxxxxxx>
Date:   Wed Mar 10 14:17:58 2021 -0800

    net: dsa: bcm_sf2: Qualify phydev->dev_flags based on port
    
    [ Upstream commit 47142ed6c34d544ae9f0463e58d482289cbe0d46 ]
    
    Similar to commit 92696286f3bb37ba50e4bd8d1beb24afb759a799 ("net:
    bcmgenet: Set phydev->dev_flags only for internal PHYs") we need to
    qualify the phydev->dev_flags based on whether the port is connected to
    an internal or external PHY otherwise we risk having a flags collision
    with a completely different interpretation depending on the driver.
    
    Fixes: aa9aef77c761 ("net: dsa: bcm_sf2: communicate integrated PHY revision to PHY driver")
    Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index edb0a1027b38..510324916e91 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -584,8 +584,10 @@ static u32 bcm_sf2_sw_get_phy_flags(struct dsa_switch *ds, int port)
 	 * in bits 15:8 and the patch level in bits 7:0 which is exactly what
 	 * the REG_PHY_REVISION register layout is.
 	 */
-
-	return priv->hw_params.gphy_rev;
+	if (priv->int_phy_mask & BIT(port))
+		return priv->hw_params.gphy_rev;
+	else
+		return 0;
 }
 
 static void bcm_sf2_sw_validate(struct dsa_switch *ds, int port,



[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