net: zynq_gem: Fix masking of supported phydev features
Subsystems (2)
PATCH 1/1 net: zynq_gem: Fix masking of supported phydev features
When the zynq_gem driver initializes the phy it sets the supported features that the phy can support and advertise. However instead of masking the supported features such that it limits the available features it sets the phy to have the exact supported features of the zynq_gem. This is problematic as it will enable features that a phy does not have or cannot advertise.
Specifically this appears as an issue when using a phy that is only capable of 10/100, but the zynq_gem driver will override this and try to enable and advertise 10/100/1000.
--- drivers/net/zynq_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/zynq_gem.c +1 -1
@@ -340,7 +340,7 @@ static int zynq_phy_init(struct udevice *dev)if (!priv->phydev)return -ENODEV ; - priv->phydev->supported = supported | ADVERTISED_Pause | + priv->phydev->supported &= supported | ADVERTISED_Pause | ADVERTISED_Asym_Pause; priv->phydev->advertising = priv->phydev->supported;
Signature · 1 line
2.11.0
PATCH 1/1 net: zynq_gem: Fix masking of supported phydev features
Quoted 11 lines · Nathan Rossi
When the
zynq_gemdriver initializes the phy it sets the supported features that the phy can support and advertise. However instead of masking the supported features such that it limits the available features it sets the phy to have the exact supported features of thezynq_gem. This is problematic as it will enable features that a phy does not have or cannot advertise.Specifically this appears as an issue when using a phy that is only capable of 10/100, but the
zynq_gemdriver will override this and try to enable and advertise 10/100/1000.
Quoted 6 lines
Reported-by Arno Steffens <[email protected]>Fixes 80243528ef ("net: gem: Fix gem driver on 1Gbps LAN")Signed-off-by Nathan Rossi <[email protected]>Tested-by Arno Steffens <[email protected]>Cc Joe Hershberger <[email protected]>Cc Michal Simek <[email protected]>
PATCH 1/1 net: zynq_gem: Fix masking of supported phydev features
Quoted 12 lines · Joe Hershberger
Quoted 11 lines · Nathan Rossi
When the
zynq_gemdriver initializes the phy it sets the supported features that the phy can support and advertise. However instead of masking the supported features such that it limits the available features it sets the phy to have the exact supported features of thezynq_gem. This is problematic as it will enable features that a phy does not have or cannot advertise.Specifically this appears as an issue when using a phy that is only capable of 10/100, but the
zynq_gemdriver will override this and try to enable and advertise 10/100/1000.
Quoted 9 lines
Quoted 6 lines
Reported-by Arno Steffens <[email protected]>Fixes 80243528ef ("net: gem: Fix gem driver on 1Gbps LAN")Signed-off-by Nathan Rossi <[email protected]>Tested-by Arno Steffens <[email protected]>Cc Joe Hershberger <[email protected]>Cc Michal Simek <[email protected]>Acked-by Joe Hershberger <[email protected]>
Thanks,
Michal