net: dsa: microchip: Support GMII on user ports
PATCH 1/1 net: dsa: microchip: Support GMII on user ports
The user ports on KSZ879x indicate they are of GMII interface type instead of INTERNAL interface type. Add GMII into the list of supported user port interfaces to avoid the following failure on probe:
"
ksz8795-switch spi0.0 lan1 (uninitialized): validation of gmii with support 0000000,00000000,000062cf and advertisement 0000000,00000000,000062cf failed: -EINVAL ksz8795-switch spi0.0 lan1 (uninitialized): failed to connect to PHY: -EINVAL
ksz8795-switch spi0.0 lan1 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 0
"
---
Cc: Arun Ramadoss <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Vladimir Oltean <[email protected]>
--- drivers/net/dsa/microchip/ksz_common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/dsa/microchip/ksz_common.c +4 -1
@@ -803,9 +803,12 @@ static void ksz_phylink_get_caps(struct dsa_switch *ds, int port,if (dev->info->supports_rgmii[port])phy_interface_set_rgmii (config->supported_interfaces); -if (dev->info->internal_phy[port]) +if (dev->info->internal_phy[port]) { +__set_bit (PHY_INTERFACE_MODE_GMII , + config->supported_interfaces);__set_bit (PHY_INTERFACE_MODE_INTERNAL , config->supported_interfaces); + }if (dev->dev_ops->get_caps) dev->dev_ops->get_caps (dev, port, config);
Signature · 1 line
2.35.1
Vladimir Oltean
maintainerQuoted 10 lines · Marek Vasut
The user ports on KSZ879x indicate they are of GMII interface type instead of INTERNAL interface type. Add GMII into the list of supported user port interfaces to avoid the following failure on probe:
"
ksz8795-switch spi0.0 lan1 (uninitialized): validation of gmii with support 0000000,00000000,000062cf and advertisement 0000000,00000000,000062cf failed:-EINVALksz8795-switch spi0.0 lan1 (uninitialized): failed to connect to PHY:-EINVAL
ksz8795-switch spi0.0 lan1 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 0
"
Quoted 6 lines
Signed-off-by Marek Vasut <[email protected]>---
Cc: Arun Ramadoss <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Vladimir Oltean <[email protected]>
Quoted 11 lines · Vladimir Oltean
Quoted 10 lines · Marek Vasut
The user ports on KSZ879x indicate they are of GMII interface type instead of INTERNAL interface type. Add GMII into the list of supported user port interfaces to avoid the following failure on probe:
"
ksz8795-switch spi0.0 lan1 (uninitialized): validation of gmii with support 0000000,00000000,000062cf and advertisement 0000000,00000000,000062cf failed:-EINVALksz8795-switch spi0.0 lan1 (uninitialized): failed to connect to PHY:-EINVAL
ksz8795-switch spi0.0 lan1 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 0
"
Quoted 8 lines
Quoted 6 lines
Signed-off-by Marek Vasut <[email protected]>---
Cc: Arun Ramadoss <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Vladimir Oltean <[email protected]>
Nice, thanks !