Subject: Re: [PATCH net-next] net: stmmac: qcom-ethqos: remove MAC_CTRL_REG modification

From: "Russell King (Oracle)" <[email-masked]>
Date: Thu, 30 Oct 2025 10:16:57 +0000

On Thu, Oct 30, 2025 at 11:01:48AM +0100, Konrad Dybcio wrote:
> On 10/29/25 11:18 AM, Russell King (Oracle) wrote:
> > Whereas ethqos_configure_sgmii():
> > 2500: clears ETHQOS_MAC_CTRL_PORT_SEL           B14=X B15=0
> > 1000: clears ETHQOS_MAC_CTRL_PORT_SEL           B14=X B15=0
> > 100: sets ETHQOS_MAC_CTRL_PORT_SEL |            B14=1 B15=1
> >           ETHQOS_MAC_CTRL_SPEED_MODE
> > 10: sets ETHQOS_MAC_CTRL_PORT_SEL               B14=0 B15=1
> >     clears ETHQOS_MAC_CTRL_SPEED_MODE
> > 
> > Thus, they appear to be doing very similar, with the exception of the
> > FES bit (bit 14) for 1G and 2.5G speeds.
> 
> Without any additional knowledge, the register description says:
> 
> 2500: B14=1 B15=0
> 1000: B14=0 B15=0
>  100: B14=1 B15=1
>   10: B14=0 B15=1
> 
> (so the current state of this driver)
> 
> and it indeed seems to match the values set in dwmac4_setup()
> 
> Reviewed-by: Konrad Dybcio <[email-masked]>

Thanks Konrad. I've included an extract from your reply in the commit
description as well, thanks for referring back to the documentation.

Note that B14 is not explicitly configured by ethqos_configure_sgmii()
for 1G and 2.5G speeds which is a harmless bug in this glue driver,
and an additional reason to get rid of this code!

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