aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2021-03-13 17:45:50 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2021-04-18 12:06:27 +0200
commitd9b3edef4d84df70a62795cbad2012acc2ee6cab (patch)
treed645809b34e70c7d43460ae7f6c6fdf28779c352
parent209f2386a57d19eae9d7d5daa192d2f81c3a9202 (diff)
downloadupstream-d9b3edef4d84df70a62795cbad2012acc2ee6cab.tar.gz
upstream-d9b3edef4d84df70a62795cbad2012acc2ee6cab.tar.bz2
upstream-d9b3edef4d84df70a62795cbad2012acc2ee6cab.zip
realtek: need to handle PHY_INTERFACE_MODE_NA for sfps
From the validate docs in include/linux/phylink.h: When state->interface is PHY_INTERFACE_MODE_NA, phylink expects the MAC driver to return all supported link modes. Tested-by: Birger Koblitz <mail@birger-koblitz.de> Signed-off-by: Bjørn Mork <bjorn@mork.no> (cherry picked from commit 785d830e889ba18793acf369e447d704269169af)
-rw-r--r--target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c
index af6d92cbc2..2c49ea27a1 100644
--- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c
@@ -245,6 +245,7 @@ static void rtl83xx_phylink_validate(struct dsa_switch *ds, int port,
pr_debug("In %s port %d", __func__, port);
if (!phy_interface_mode_is_rgmii(state->interface) &&
+ state->interface != PHY_INTERFACE_MODE_NA &&
state->interface != PHY_INTERFACE_MODE_1000BASEX &&
state->interface != PHY_INTERFACE_MODE_MII &&
state->interface != PHY_INTERFACE_MODE_REVMII &&