aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@gmail.com>2018-09-17 11:22:40 -0400
committerDavid S. Miller <davem@davemloft.net>2018-09-18 22:56:29 -0400
commit08e39982ef64f800fd1f9b9b92968d14d5fafa82 (patch)
tree30cdc63558a8c169ec981384e629dcbfb8d54f25 /drivers/net/ethernet/ibm
parente285d5bfb7e9785d289663baef252dd315e171f8 (diff)
net: emac: fix fixed-link setup for the RTL8363SB switch
On the Netgear WNDAP620, the emac ethernet isn't receiving nor xmitting any frames from/to the RTL8363SB (identifies itself as a RTL8367RB). This is caused by the emac hardware not knowing the forced link parameters for speed, duplex, pause, etc. This begs the question, how this was working on the original driver code, when it was necessary to set the phy_address and phy_map to 0xffffffff. But I guess without access to the old PPC405/440/460 hardware, it's not possible to know. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r--drivers/net/ethernet/ibm/emac/core.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c
index 372664686309..129f4e9f38da 100644
--- a/drivers/net/ethernet/ibm/emac/core.c
+++ b/drivers/net/ethernet/ibm/emac/core.c
@@ -2677,12 +2677,17 @@ static int emac_init_phy(struct emac_instance *dev)
2677 if (of_phy_is_fixed_link(np)) { 2677 if (of_phy_is_fixed_link(np)) {
2678 int res = emac_dt_mdio_probe(dev); 2678 int res = emac_dt_mdio_probe(dev);
2679 2679
2680 if (!res) { 2680 if (res)
2681 res = of_phy_register_fixed_link(np); 2681 return res;
2682 if (res) 2682
2683 mdiobus_unregister(dev->mii_bus); 2683 res = of_phy_register_fixed_link(np);
2684 dev->phy_dev = of_phy_find_device(np);
2685 if (res || !dev->phy_dev) {
2686 mdiobus_unregister(dev->mii_bus);
2687 return res ? res : -EINVAL;
2684 } 2688 }
2685 return res; 2689 emac_adjust_link(dev->ndev);
2690 put_device(&dev->phy_dev->mdio.dev);
2686 } 2691 }
2687 return 0; 2692 return 0;
2688 } 2693 }