Message ID | 20221129050639.111142-1-s-vadapalli@ti.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 6c681f899e0360803b924ac8c96ee21965118649 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10 | expand |
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 >
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.
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.
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.
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.
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!
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)
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(-)