diff --git a/patches.suse/net-emac-fix-fixed-link-setup-for-the-RTL8363SB-swit.patch b/patches.suse/net-emac-fix-fixed-link-setup-for-the-RTL8363SB-swit.patch new file mode 100644 index 0000000..19b937d --- /dev/null +++ b/patches.suse/net-emac-fix-fixed-link-setup-for-the-RTL8363SB-swit.patch @@ -0,0 +1,57 @@ +From 4516a76b0ee26777ae8e8c8e787817ebb24a93e8 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Mon, 17 Sep 2018 17:22:40 +0200 +Subject: [PATCH 7/7] net: emac: fix fixed-link setup for the RTL8363SB switch +References: git-fixes +Patch-mainline: v4.19-rc6 +Git-commit: 08e39982ef64f800fd1f9b9b92968d14d5fafa82 + +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 +Signed-off-by: David S. Miller +Signed-off-by: Denis Kirjanov +--- + drivers/net/ethernet/ibm/emac/core.c | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c +index d28e5a9a1363..b7d65158e498 100644 +--- a/drivers/net/ethernet/ibm/emac/core.c ++++ b/drivers/net/ethernet/ibm/emac/core.c +@@ -2673,12 +2673,17 @@ static int emac_init_phy(struct emac_instance *dev) + if (of_phy_is_fixed_link(np)) { + int res = emac_dt_mdio_probe(dev); + +- if (!res) { +- res = of_phy_register_fixed_link(np); +- if (res) +- mdiobus_unregister(dev->mii_bus); ++ if (res) ++ return res; ++ ++ res = of_phy_register_fixed_link(np); ++ dev->phy_dev = of_phy_find_device(np); ++ if (res || !dev->phy_dev) { ++ mdiobus_unregister(dev->mii_bus); ++ return res ? res : -EINVAL; + } +- return res; ++ emac_adjust_link(dev->ndev); ++ put_device(&dev->phy_dev->mdio.dev); + } + return 0; + } +-- +2.16.4 + diff --git a/series.conf b/series.conf index 3394e59..57cdb2e 100644 --- a/series.conf +++ b/series.conf @@ -41107,6 +41107,7 @@ patches.suse/media-af9035-prevent-buffer-overflow-on-write.patch patches.suse/net-stmmac-Fixup-the-tail-addr-setting-in-xmit-path.patch patches.suse/NFC-Fix-possible-memory-corruption-when-handling-SHD.patch + patches.suse/net-emac-fix-fixed-link-setup-for-the-RTL8363SB-swit.patch patches.suse/net-mlx5-Fix-read-from-coherent-memory.patch patches.suse/net-mlx5-Check-for-SQ-and-not-RQ-state-when-modifyin.patch patches.suse/net-mlx5e-TLS-Read-capabilities-only-when-it-is-safe.patch