Subject: Re: [PATCH net-next 08/10] net: stmmac: qcom-ethqos: use phy interface mode for inband

From: "Russell King (Oracle)" <[email-masked]>
Date: Wed, 25 Feb 2026 01:30:01 +0000

On Tue, Feb 24, 2026 at 05:10:52PM -0800, Jakub Kicinski wrote:
> On Mon, 23 Feb 2026 09:34:51 +0000 Russell King (Oracle) wrote:
> >  	switch (speed) {
> >  	case SPEED_2500:
> > -		rgmii_setmask(ethqos, RGMII_CONFIG2_RGMII_CLK_SEL_CFG,
> > -			      RGMII_IO_MACRO_CONFIG2);
> > -		ethqos_set_serdes_speed(ethqos, SPEED_2500);
> > -		ethqos_pcs_set_inband(priv, false);
> > -		break;
> >  	case SPEED_1000:
> >  		rgmii_setmask(ethqos, RGMII_CONFIG2_RGMII_CLK_SEL_CFG,
> >  			      RGMII_IO_MACRO_CONFIG2);
> > -		ethqos_set_serdes_speed(ethqos, SPEED_1000);
> > -		ethqos_pcs_set_inband(priv, true);
> 
> Not clear to me why rgmii_setmask() goes away in the 2.5G case?
> Just checking it's intentional..

It doesn't. The code ends up as:

	switch (speed) {
	case SPEED_2500:
	case SPEED_1000:
		rgmii_setmask(ethqos, RGMII_CONFIG2_RGMII_CLK_SEL_CFG,
			      RGMII_IO_MACRO_CONFIG2);
		break;

rather than being:

	switch (speed) {
	case SPEED_2500:
		rgmii_setmask(ethqos, RGMII_CONFIG2_RGMII_CLK_SEL_CFG,
			      RGMII_IO_MACRO_CONFIG2);
		break;
	case SPEED_1000:
		rgmii_setmask(ethqos, RGMII_CONFIG2_RGMII_CLK_SEL_CFG,
			      RGMII_IO_MACRO_CONFIG2);
		break;

which is needless duplication.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!