[openwrt/openwrt] ipq40xx: fix PHY subsystem compilation (phy_interface_num_ports())
LEDE Commits
lede-commits at lists.infradead.org
Wed Feb 7 00:19:55 PST 2024
rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/9e41117953e31ffe355416e962ecf0e000dc594d
commit 9e41117953e31ffe355416e962ecf0e000dc594d
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Wed Feb 7 09:17:50 2024 +0100
ipq40xx: fix PHY subsystem compilation (phy_interface_num_ports())
Fixes:
drivers/net/phy/phy-core.c: In function 'phy_interface_num_ports':
drivers/net/phy/phy-core.c:107:9: error: enumeration value 'PHY_INTERFACE_MODE_PSGMII' not handled in switch [-Werror=switch]
107 | switch (interface) {
| ^~~~~~
Fixes: 8a7f667fb53e ("kernel: 5.15: backport v6.1 PHY changes required for Aquantia")
Fixes: https://github.com/openwrt/openwrt/issues/14560
Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
.../704-net-phy-define-PSGMII-PHY-interface-mode.patch | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/target/linux/ipq40xx/patches-5.15/704-net-phy-define-PSGMII-PHY-interface-mode.patch b/target/linux/ipq40xx/patches-5.15/704-net-phy-define-PSGMII-PHY-interface-mode.patch
index c707e5c8ff..1cc8ec1f03 100644
--- a/target/linux/ipq40xx/patches-5.15/704-net-phy-define-PSGMII-PHY-interface-mode.patch
+++ b/target/linux/ipq40xx/patches-5.15/704-net-phy-define-PSGMII-PHY-interface-mode.patch
@@ -30,6 +30,17 @@ Signed-off-by: Gabor Juhos <j4g8y7 at gmail.com>
- qsgmii
- tbi
- rev-mii
+--- a/drivers/net/phy/phy-core.c
++++ b/drivers/net/phy/phy-core.c
+@@ -140,6 +140,8 @@ int phy_interface_num_ports(phy_interfac
+ case PHY_INTERFACE_MODE_QSGMII:
+ case PHY_INTERFACE_MODE_QUSGMII:
+ return 4;
++ case PHY_INTERFACE_MODE_PSGMII:
++ return 5;
+ case PHY_INTERFACE_MODE_MAX:
+ WARN_ONCE(1, "PHY_INTERFACE_MODE_MAX isn't a valid interface mode");
+ return 0;
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -371,6 +371,7 @@ void phylink_get_linkmodes(unsigned long
More information about the lede-commits
mailing list