net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_
Subsystems (4)
Andrew Lunn
maintainerPATCH 1/1 net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_
The switch can either take the MAC or the PHY role in an MII or RMII link. There are distinct PHY_INTERFACE_ macros for these two roles. Correct the mapping so that the REV version is used for the PHY role.
---
Since this has not caused any known issues so far, i decided to not add a Fixes: tag and submit for net.
drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/dsa/mv88e6xxx/chip.c +2 -2
@@ -611,10 +611,10 @@ static void mv88e6185_phylink_get_caps(struct mv88e6xxx_chip *chip, int port, }static const u8 mv88e6xxx_phy_interface_modes[] = { - [MV88E6XXX_PORT_STS_CMODE_MII_PHY ] =PHY_INTERFACE_MODE_MII , + [MV88E6XXX_PORT_STS_CMODE_MII_PHY ] =PHY_INTERFACE_MODE_REVMII , [MV88E6XXX_PORT_STS_CMODE_MII ] =PHY_INTERFACE_MODE_MII , [MV88E6XXX_PORT_STS_CMODE_GMII ] =PHY_INTERFACE_MODE_GMII , - [MV88E6XXX_PORT_STS_CMODE_RMII_PHY ] =PHY_INTERFACE_MODE_RMII , + [MV88E6XXX_PORT_STS_CMODE_RMII_PHY ] =PHY_INTERFACE_MODE_REVRMII , [MV88E6XXX_PORT_STS_CMODE_RMII ] =PHY_INTERFACE_MODE_RMII , [MV88E6XXX_PORT_STS_CMODE_100BASEX ] =PHY_INTERFACE_MODE_100BASEX , [MV88E6XXX_PORT_STS_CMODE_1000BASEX ] =PHY_INTERFACE_MODE_1000BASEX ,
Signature · 1 line
2.40.0
Quoted 6 lines · Andrew Lunn
The switch can either take the MAC or the PHY role in an MII or RMII link. There are distinct
PHY_INTERFACE_macros for these two roles. Correct the mapping so that theREVversion is used for the PHY role.Signed-off-by Andrew Lunn <[email protected]>
Quoted 2 lines
Since this has not caused any known issues so far, i decided to not add a Fixes: tag and submit for net.
I concur.
Thanks.
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Quoted 7 lines · Andrew Lunn
The switch can either take the MAC or the PHY role in an MII or RMII link. There are distinct
PHY_INTERFACE_macros for these two roles. Correct the mapping so that theREVversion is used for the PHY role.Signed-off-by Andrew Lunn <[email protected]>---
Quoted 27 lines
Since this has not caused any known issues so far, i decided to not add a Fixes: tag and submit for net.
drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/dsa/mv88e6xxx/chip.c +2
-2@@ -611,10 +611,10 @@ static void mv88e6185_phylink_get_caps(struct mv88e6xxx_chip *chip, int port, }static const u8 mv88e6xxx_phy_interface_modes[] = { - [MV88E6XXX_PORT_STS_CMODE_MII_PHY ] =PHY_INTERFACE_MODE_MII , + [MV88E6XXX_PORT_STS_CMODE_MII_PHY ] =PHY_INTERFACE_MODE_REVMII , [MV88E6XXX_PORT_STS_CMODE_MII ] =PHY_INTERFACE_MODE_MII , [MV88E6XXX_PORT_STS_CMODE_GMII ] =PHY_INTERFACE_MODE_GMII , - [MV88E6XXX_PORT_STS_CMODE_RMII_PHY ] =PHY_INTERFACE_MODE_RMII , + [MV88E6XXX_PORT_STS_CMODE_RMII_PHY ] =PHY_INTERFACE_MODE_REVRMII , [MV88E6XXX_PORT_STS_CMODE_RMII ] =PHY_INTERFACE_MODE_RMII , [MV88E6XXX_PORT_STS_CMODE_100BASEX ] =PHY_INTERFACE_MODE_100BASEX , [MV88E6XXX_PORT_STS_CMODE_1000BASEX ] =PHY_INTERFACE_MODE_1000BASEX ,Signature · 1 line
2.40.0
Quoted 25 lines · Vladimir Oltean
Quoted 7 lines · Andrew Lunn
The switch can either take the MAC or the PHY role in an MII or RMII link. There are distinct
PHY_INTERFACE_macros for these two roles. Correct the mapping so that theREVversion is used for the PHY role.Signed-off-by Andrew Lunn <[email protected]>---
Reviewed-by Vladimir Oltean <[email protected]>Quoted 14 lines
Since this has not caused any known issues so far, i decided to not add a Fixes: tag and submit for net.
drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/dsa/mv88e6xxx/chip.c +0
-0@@ -611,10 +611,10 @@ static void mv88e6185_phylink_get_caps(struct mv88e6xxx_chip *chip, int port, }
Quoted 3 lines
drivers/net/dsa/mv88e6xxx/chip.c static void mv88e6185_phylink_get_caps(struct mv88e6xxx_chip *chip, int port, · line 614
Quoted 3 lines
drivers/net/dsa/mv88e6xxx/chip.c +1
-1static const u8 mv88e6xxx_phy_interface_modes[] = { - [MV88E6XXX_PORT_STS_CMODE_MII_PHY ] =PHY_INTERFACE_MODE_MII , + [MV88E6XXX_PORT_STS_CMODE_MII_PHY ] =PHY_INTERFACE_MODE_REVMII ,
Is this hunk correct?
Quoted 10 lines
Quoted 10 lines
drivers/net/dsa/mv88e6xxx/chip.c +1
-1[MV88E6XXX_PORT_STS_CMODE_MII] = PHY_INTERFACE_MODE_MII, [MV88E6XXX_PORT_STS_CMODE_GMII] = PHY_INTERFACE_MODE_GMII, - [MV88E6XXX_PORT_STS_CMODE_RMII_PHY] = PHY_INTERFACE_MODE_RMII, + [MV88E6XXX_PORT_STS_CMODE_RMII_PHY] = PHY_INTERFACE_MODE_REVRMII, [MV88E6XXX_PORT_STS_CMODE_RMII] = PHY_INTERFACE_MODE_RMII, [MV88E6XXX_PORT_STS_CMODE_100BASEX] = PHY_INTERFACE_MODE_100BASEX, [MV88E6XXX_PORT_STS_CMODE_1000BASEX] = PHY_INTERFACE_MODE_1000BASEX,Signature · 1 line
2.40.0
Signature · 1 line
Florian
Andrew Lunn
maintainerQuoted 7 lines · Vladimir Oltean
Quoted 5 lines · Andrew Lunn
Quoted 4 lines
The switch can either take the MAC or the PHY role in an MII or RMII link. There are distinct
PHY_INTERFACE_macros for these two roles. Correct the mapping so that theREVversion is used for the PHY role.
Quoted 5 lines
Quoted 3 lines
drivers/net/dsa/mv88e6xxx/chip.c static void mv88e6185_phylink_get_caps(struct mv88e6xxx_chip *chip, int port, · line 614
Quoted 3 lines
static const u8 mv88e6xxx_phy_interface_modes[] = {drivers/net/dsa/mv88e6xxx/chip.c +1
-1- [MV88E6XXX_PORT_STS_CMODE_MII_PHY] = PHY_INTERFACE_MODE_MII, + [MV88E6XXX_PORT_STS_CMODE_MII_PHY] = PHY_INTERFACE_MODE_REVMII,Is this hunk correct?
Hi Florian
I don't see why it is wrong, but you can be blind to bugs in your own code. What do you think is wrong?
Thanks
Andrew
Florian Fainelli
Reviewed-byQuoted 13 lines · Andrew Lunn
Quoted 7 lines · Vladimir Oltean
Quoted 5 lines · Andrew Lunn
Quoted 4 lines
The switch can either take the MAC or the PHY role in an MII or RMII link. There are distinct
PHY_INTERFACE_macros for these two roles. Correct the mapping so that theREVversion is used for the PHY role.Quoted 5 lines
Quoted 3 lines
drivers/net/dsa/mv88e6xxx/chip.c static void mv88e6185_phylink_get_caps(struct mv88e6xxx_chip *chip, int port, · line 614
Quoted 3 lines
static const u8 mv88e6xxx_phy_interface_modes[] = {drivers/net/dsa/mv88e6xxx/chip.c +1
-1- [MV88E6XXX_PORT_STS_CMODE_MII_PHY] = PHY_INTERFACE_MODE_MII, + [MV88E6XXX_PORT_STS_CMODE_MII_PHY] = PHY_INTERFACE_MODE_REVMII,Is this hunk correct?
Quoted 4 lines
Hi Florian
I don't see why it is wrong, but you can be blind to bugs in your own code. What do you think is wrong?
I was not thinking it was wrong, just curious about the meaning of a CMODE value suffixed with _PHY, though it seems clear(er) now that this means the port is configured as a PHY and provides PHY signals to the MAC it connects to.
PS: you can be blind without enough coffee as well :p
Signature · 1 line
Florian
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Tue, 11 Apr 2023 04:35:41 +0200 you wrote:
The switch can either take the MAC or the PHY role in an MII or RMII link. There are distinct
PHY_INTERFACE_macros for these two roles. Correct the mapping so that theREVversion is used for the PHY role.Signed-off-by Andrew Lunn <[email protected]>[...]
Here is the summary with links:
- [net-next] net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_
https://git.kernel.org/netdev/net-next/c/18bb56ab4477
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html