* [PATCH net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10
@ 2022-11-29 5:06 Siddharth Vadapalli
2022-11-29 5:46 ` Pavan Chebbi
2022-12-01 6:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 7+ messages in thread
From: Siddharth Vadapalli @ 2022-11-29 5:06 UTC (permalink / raw)
To: davem, edumazet, kuba, linux, vladimir.oltean, pabeni, rogerq
Cc: netdev, linux-kernel, linux-arm-kernel, vigneshr, spatton, s-vadapalli
The am65-cpsw driver supports configuring all RGMII variants at interface
speed of 10 Mbps. However, in the process of shifting to the PHYLINK
framework, the support for all variants of RGMII except the
PHY_INTERFACE_MODE_RGMII variant was accidentally removed.
Fix this by using phy_interface_mode_is_rgmii() to check for all variants
of RGMII mode.
Fixes: e8609e69470f ("net: ethernet: ti: am65-cpsw: Convert to PHYLINK")
Reported-by: Schuyler Patton <spatton@ti.com>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---
drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 6b0458df613a..6ae802d73063 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -1495,7 +1495,7 @@ static void am65_cpsw_nuss_mac_link_up(struct phylink_config *config, struct phy
if (speed == SPEED_1000)
mac_control |= CPSW_SL_CTL_GIG;
- if (speed == SPEED_10 && interface == PHY_INTERFACE_MODE_RGMII)
+ if (speed == SPEED_10 && phy_interface_mode_is_rgmii(interface))
/* Can be used with in band mode only */
mac_control |= CPSW_SL_CTL_EXT_EN;
if (speed == SPEED_100 && interface == PHY_INTERFACE_MODE_RMII)
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10
2022-11-29 5:06 [PATCH net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10 Siddharth Vadapalli
@ 2022-11-29 5:46 ` Pavan Chebbi
2022-11-29 16:46 ` Vladimir Oltean
2022-11-30 5:24 ` Siddharth Vadapalli
2022-12-01 6:00 ` patchwork-bot+netdevbpf
1 sibling, 2 replies; 7+ messages in thread
From: Pavan Chebbi @ 2022-11-29 5:46 UTC (permalink / raw)
To: Siddharth Vadapalli
Cc: davem, edumazet, kuba, linux, vladimir.oltean, pabeni, rogerq,
netdev, linux-kernel, linux-arm-kernel, vigneshr, spatton
[-- Attachment #1: Type: text/plain, Size: 1576 bytes --]
Looks like this patch should be directed to net-next?
On Tue, Nov 29, 2022 at 10:37 AM Siddharth Vadapalli <s-vadapalli@ti.com> wrote:
>
> The am65-cpsw driver supports configuring all RGMII variants at interface
> speed of 10 Mbps. However, in the process of shifting to the PHYLINK
> framework, the support for all variants of RGMII except the
> PHY_INTERFACE_MODE_RGMII variant was accidentally removed.
>
> Fix this by using phy_interface_mode_is_rgmii() to check for all variants
> of RGMII mode.
>
> Fixes: e8609e69470f ("net: ethernet: ti: am65-cpsw: Convert to PHYLINK")
> Reported-by: Schuyler Patton <spatton@ti.com>
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> ---
> drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> index 6b0458df613a..6ae802d73063 100644
> --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> @@ -1495,7 +1495,7 @@ static void am65_cpsw_nuss_mac_link_up(struct phylink_config *config, struct phy
>
> if (speed == SPEED_1000)
> mac_control |= CPSW_SL_CTL_GIG;
> - if (speed == SPEED_10 && interface == PHY_INTERFACE_MODE_RGMII)
> + if (speed == SPEED_10 && phy_interface_mode_is_rgmii(interface))
> /* Can be used with in band mode only */
> mac_control |= CPSW_SL_CTL_EXT_EN;
> if (speed == SPEED_100 && interface == PHY_INTERFACE_MODE_RMII)
> --
> 2.25.1
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10
2022-11-29 5:46 ` Pavan Chebbi
@ 2022-11-29 16:46 ` Vladimir Oltean
2022-11-30 5:59 ` Siddharth Vadapalli
2022-11-30 5:24 ` Siddharth Vadapalli
1 sibling, 1 reply; 7+ messages in thread
From: Vladimir Oltean @ 2022-11-29 16:46 UTC (permalink / raw)
To: Pavan Chebbi
Cc: Siddharth Vadapalli, davem, edumazet, kuba, linux, pabeni,
rogerq, netdev, linux-kernel, linux-arm-kernel, vigneshr,
spatton
On Tue, Nov 29, 2022 at 11:16:42AM +0530, Pavan Chebbi wrote:
> Looks like this patch should be directed to net-next?
Do you know more about what CPSW_SL_CTL_EXT_EN does, exactly? I'm not
able to assess the impact of the bug being fixed. What doesn't work?
Maybe Siddharth could put more focus on that.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10
2022-11-29 5:46 ` Pavan Chebbi
2022-11-29 16:46 ` Vladimir Oltean
@ 2022-11-30 5:24 ` Siddharth Vadapalli
2022-11-30 5:56 ` Pavan Chebbi
1 sibling, 1 reply; 7+ messages in thread
From: Siddharth Vadapalli @ 2022-11-30 5:24 UTC (permalink / raw)
To: Pavan Chebbi
Cc: davem, edumazet, kuba, linux, vladimir.oltean, pabeni, rogerq,
netdev, linux-kernel, linux-arm-kernel, vigneshr, spatton,
s-vadapalli
Hello,
On 29/11/22 11:16, Pavan Chebbi wrote:
> Looks like this patch should be directed to net-next?
The commit fixed by this patch is a part of the released kernel. Thus, I
think it should be a part of net instead of net-next. Please let me know.
Regards,
Siddharth.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10
2022-11-30 5:24 ` Siddharth Vadapalli
@ 2022-11-30 5:56 ` Pavan Chebbi
0 siblings, 0 replies; 7+ messages in thread
From: Pavan Chebbi @ 2022-11-30 5:56 UTC (permalink / raw)
To: Siddharth Vadapalli
Cc: davem, edumazet, kuba, linux, vladimir.oltean, pabeni, rogerq,
netdev, linux-kernel, linux-arm-kernel, vigneshr, spatton
[-- Attachment #1: Type: text/plain, Size: 427 bytes --]
On Wed, Nov 30, 2022 at 10:54 AM Siddharth Vadapalli <s-vadapalli@ti.com> wrote:
>
> Hello,
>
> On 29/11/22 11:16, Pavan Chebbi wrote:
> > Looks like this patch should be directed to net-next?
>
> The commit fixed by this patch is a part of the released kernel. Thus, I
> think it should be a part of net instead of net-next. Please let me know.
>
Sorry, yes. Also you may want to respond to Vladimir.
> Regards,
> Siddharth.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10
2022-11-29 16:46 ` Vladimir Oltean
@ 2022-11-30 5:59 ` Siddharth Vadapalli
0 siblings, 0 replies; 7+ messages in thread
From: Siddharth Vadapalli @ 2022-11-30 5:59 UTC (permalink / raw)
To: Vladimir Oltean
Cc: davem, edumazet, kuba, linux, pabeni, rogerq, netdev,
linux-kernel, linux-arm-kernel, vigneshr, spatton, Pavan Chebbi,
s-vadapalli
Hello,
On 29/11/22 22:16, Vladimir Oltean wrote:
> On Tue, Nov 29, 2022 at 11:16:42AM +0530, Pavan Chebbi wrote:
>> Looks like this patch should be directed to net-next?
>
> Do you know more about what CPSW_SL_CTL_EXT_EN does, exactly? I'm not
> able to assess the impact of the bug being fixed. What doesn't work?
> Maybe Siddharth could put more focus on that.
The CPSW_SL_CTL_EXT_EN bit is used to control in-band mode v/s forced
mode of operation. Setting the bit selects in-band mode while clearing
it selects forced mode. Thus, if the bit isn't set for certain variants
of RGMII mode, then those variants of RGMII mode will not work in
in-band mode of operation.
Please refer to the patch at [1] which corresponds to the commit being
fixed. That patch intended to convert the existing driver to utilize the
PHYLINK framework. In that process, the following line:
if (phy->speed == 10 && phy_interface_is_rgmii(phy))
was removed from the am65_cpsw_nuss_adjust_link() function and added in
the am65_cpsw_nuss_mac_link_up() function in the same patch as:
if (speed == SPEED_10 && interface == PHY_INTERFACE_MODE_RGMII)
instead of:
if (speed == SPEED_10 && phy_interface_mode_is_rgmii(interface))
Due to the above, the already existing support for in-band mode of
operation for all RGMII mode variants was accidentally changed to
support for in-band mode of operation for just the
PHY_INTERFACE_MODE_RGMII variant.
[1]
https://patchwork.kernel.org/project/netdevbpf/patch/20220309075944.32166-1-s-vadapalli@ti.com/
Regards,
Siddharth.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10
2022-11-29 5:06 [PATCH net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10 Siddharth Vadapalli
2022-11-29 5:46 ` Pavan Chebbi
@ 2022-12-01 6:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-01 6:00 UTC (permalink / raw)
To: Siddharth Vadapalli
Cc: davem, edumazet, kuba, linux, vladimir.oltean, pabeni, rogerq,
netdev, linux-kernel, linux-arm-kernel, vigneshr, spatton
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 29 Nov 2022 10:36:39 +0530 you wrote:
> The am65-cpsw driver supports configuring all RGMII variants at interface
> speed of 10 Mbps. However, in the process of shifting to the PHYLINK
> framework, the support for all variants of RGMII except the
> PHY_INTERFACE_MODE_RGMII variant was accidentally removed.
>
> Fix this by using phy_interface_mode_is_rgmii() to check for all variants
> of RGMII mode.
>
> [...]
Here is the summary with links:
- [net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10
https://git.kernel.org/netdev/net/c/6c681f899e03
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:[~2022-12-01 6:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-29 5:06 [PATCH net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10 Siddharth Vadapalli
2022-11-29 5:46 ` Pavan Chebbi
2022-11-29 16:46 ` Vladimir Oltean
2022-11-30 5:59 ` Siddharth Vadapalli
2022-11-30 5:24 ` Siddharth Vadapalli
2022-11-30 5:56 ` Pavan Chebbi
2022-12-01 6:00 ` 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).