Messages in this thread | | | Date | Wed, 30 Nov 2022 11:29:40 +0530 | Subject | Re: [PATCH net] net: ethernet: ti: am65-cpsw: Fix RGMII configuration at SPEED_10 | From | Siddharth 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.
| |