mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 09:39:00 +00:00
2b7344055b
In 5.4 kernel old u32 array way of setting network features was dropped and linkmode is now the only way. So lets migrate the PHY driver to support linkmode. Also, now in order for gigabit to work, PHY driver needs to advertise PHY_GBIT_FEATURES instead of PHY_BASIC_FEATURES Signed-off-by: Robert Marko <robert.marko@sartura.hr>
24 lines
614 B
Diff
24 lines
614 B
Diff
--- a/drivers/net/phy/ar40xx.c
|
|
+++ b/drivers/net/phy/ar40xx.c
|
|
@@ -2021,6 +2021,12 @@ static int ar40xx_probe(struct platform_
|
|
/* register switch */
|
|
swdev = &priv->dev;
|
|
|
|
+ if (priv->mii_bus == NULL) {
|
|
+ dev_err(&pdev->dev, "Probe failed - Missing PHYs!\n");
|
|
+ ret = -ENODEV;
|
|
+ goto err_missing_phy;
|
|
+ }
|
|
+
|
|
swdev->alias = dev_name(&priv->mii_bus->dev);
|
|
|
|
swdev->cpu_port = AR40XX_PORT_CPU;
|
|
@@ -2052,6 +2058,7 @@ err_unregister_switch:
|
|
unregister_switch(&priv->dev);
|
|
err_unregister_phy:
|
|
phy_driver_unregister(&ar40xx_phy_driver);
|
|
+err_missing_phy:
|
|
platform_set_drvdata(pdev, NULL);
|
|
return ret;
|
|
}
|