aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.h
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2018-04-17 18:51:42 +0200
committerPetr Štetiar <ynezz@true.cz>2019-06-20 08:48:19 +0200
commitf96c7f697f948d521f00c37bfcb8a8aa9b94d735 (patch)
tree23d26ba54a16ff7a4f9fa49d0090f68f7a2a7280 /target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.h
parentfb423f6e01ce95523959aa3e428aa2ae7cee27f5 (diff)
downloadupstream-f96c7f697f948d521f00c37bfcb8a8aa9b94d735.tar.gz
upstream-f96c7f697f948d521f00c37bfcb8a8aa9b94d735.tar.bz2
upstream-f96c7f697f948d521f00c37bfcb8a8aa9b94d735.zip
ramips: handle mdio address and switch port seperate
The phy handling code forces a phy mdio address and the switch port to which a phy is attached to be the same. Albeit such a configuration is used for most boards, it isn't for all. Pass the switch port number to the ethernet phy connect functions, to ensure the correct list entry is edited and not the list entry that matches th phys mdio address. Use the mdio address with mdiobus_get_phy instead of the port number, to make sure the expected ethernet phy gets connected. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.h')
-rw-r--r--target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.h b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.h
index 498cf144e6..78364e33a1 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.h
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.h
@@ -19,7 +19,8 @@
int fe_mdio_init(struct fe_priv *priv);
void fe_mdio_cleanup(struct fe_priv *priv);
int fe_connect_phy_node(struct fe_priv *priv,
- struct device_node *phy_node);
+ struct device_node *phy_node,
+ int port);
#else
static inline int fe_mdio_init(struct fe_priv *priv) { return 0; }
static inline void fe_mdio_cleanup(struct fe_priv *priv) {}