[U-Boot] [PATCH] net: zynq_gem: Fix masking of supported phydev features
Nathan Rossi
nathan at nathanrossi.com
Sun Mar 5 14:36:23 UTC 2017
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.
Reported-by: Arno Steffens <star at gmx.li>
Fixes: 80243528ef ("net: gem: Fix gem driver on 1Gbps LAN")
Signed-off-by: Nathan Rossi <nathan at nathanrossi.com>
Tested-by: Arno Steffens <star at gmx.li>
Cc: Joe Hershberger <joe.hershberger at ni.com>
Cc: Michal Simek <michal.simek at xilinx.com>
---
drivers/net/zynq_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 86dd03feda..a160564439 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -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;
--
2.11.0
More information about the U-Boot
mailing list