* [PATCH net-next] net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_
@ 2023-04-11 2:35 Andrew Lunn
2023-04-11 10:48 ` Russell King (Oracle)
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Andrew Lunn @ 2023-04-11 2:35 UTC (permalink / raw)
To: David Miller, Jakub Kicinski
Cc: Vladimir Oltean, Russell King, netdev, 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 the `REV` version is used for the PHY
role.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
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(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 62a126402983..ffe6a88f94ce 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -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,
--
2.40.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_
2023-04-11 2:35 [PATCH net-next] net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_ Andrew Lunn
@ 2023-04-11 10:48 ` Russell King (Oracle)
2023-04-11 11:38 ` Vladimir Oltean
2023-04-12 4:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 7+ messages in thread
From: Russell King (Oracle) @ 2023-04-11 10:48 UTC (permalink / raw)
To: Andrew Lunn; +Cc: David Miller, Jakub Kicinski, Vladimir Oltean, netdev
On Tue, Apr 11, 2023 at 04:35:41AM +0200, Andrew Lunn 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 the `REV` version is used for the PHY
> role.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> 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.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_
2023-04-11 2:35 [PATCH net-next] net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_ Andrew Lunn
2023-04-11 10:48 ` Russell King (Oracle)
@ 2023-04-11 11:38 ` Vladimir Oltean
2023-04-11 12:33 ` Florian Fainelli
2023-04-12 4:30 ` patchwork-bot+netdevbpf
2 siblings, 1 reply; 7+ messages in thread
From: Vladimir Oltean @ 2023-04-11 11:38 UTC (permalink / raw)
To: Andrew Lunn
Cc: David Miller, Jakub Kicinski, Russell King, Florian Fainelli,
netdev
On Tue, Apr 11, 2023 at 04:35:41AM +0200, Andrew Lunn 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 the `REV` version is used for the PHY
> role.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
>
> 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(-)
>
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index 62a126402983..ffe6a88f94ce 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -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,
> --
> 2.40.0
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_
2023-04-11 11:38 ` Vladimir Oltean
@ 2023-04-11 12:33 ` Florian Fainelli
2023-04-11 12:48 ` Andrew Lunn
0 siblings, 1 reply; 7+ messages in thread
From: Florian Fainelli @ 2023-04-11 12:33 UTC (permalink / raw)
To: Vladimir Oltean, Andrew Lunn
Cc: David Miller, Jakub Kicinski, Russell King, netdev
On 4/11/2023 4:38 AM, Vladimir Oltean wrote:
> On Tue, Apr 11, 2023 at 04:35:41AM +0200, Andrew Lunn 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 the `REV` version is used for the PHY
>> role.
>>
>> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
>> ---
>
> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
>
>>
>> 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(-)
>>
>> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
>> index 62a126402983..ffe6a88f94ce 100644
>> --- a/drivers/net/dsa/mv88e6xxx/chip.c
>> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
>> @@ -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,
Is this hunk correct?
>> [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,
>> --
>> 2.40.0
>>
--
Florian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_
2023-04-11 12:33 ` Florian Fainelli
@ 2023-04-11 12:48 ` Andrew Lunn
2023-04-11 13:00 ` Florian Fainelli
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2023-04-11 12:48 UTC (permalink / raw)
To: Florian Fainelli
Cc: Vladimir Oltean, David Miller, Jakub Kicinski, Russell King,
netdev
> On 4/11/2023 4:38 AM, Vladimir Oltean wrote:
> > On Tue, Apr 11, 2023 at 04:35:41AM +0200, Andrew Lunn 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 the `REV` version is used for the PHY
> > > role.
> > > 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,
>
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_
2023-04-11 12:48 ` Andrew Lunn
@ 2023-04-11 13:00 ` Florian Fainelli
0 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2023-04-11 13:00 UTC (permalink / raw)
To: Andrew Lunn
Cc: Vladimir Oltean, David Miller, Jakub Kicinski, Russell King,
netdev
On 4/11/2023 5:48 AM, Andrew Lunn wrote:
>> On 4/11/2023 4:38 AM, Vladimir Oltean wrote:
>>> On Tue, Apr 11, 2023 at 04:35:41AM +0200, Andrew Lunn 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 the `REV` version is used for the PHY
>>>> role.
>
>>>> 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,
>>
>> 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?
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.
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
PS: you can be blind without enough coffee as well :p
--
Florian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_
2023-04-11 2:35 [PATCH net-next] net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_ Andrew Lunn
2023-04-11 10:48 ` Russell King (Oracle)
2023-04-11 11:38 ` Vladimir Oltean
@ 2023-04-12 4:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-04-12 4:30 UTC (permalink / raw)
To: Andrew Lunn; +Cc: davem, kuba, vladimir.oltean, rmk+kernel, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
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 the `REV` version is used for the PHY
> role.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-04-12 4:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-11 2:35 [PATCH net-next] net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_ Andrew Lunn
2023-04-11 10:48 ` Russell King (Oracle)
2023-04-11 11:38 ` Vladimir Oltean
2023-04-11 12:33 ` Florian Fainelli
2023-04-11 12:48 ` Andrew Lunn
2023-04-11 13:00 ` Florian Fainelli
2023-04-12 4:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).