Re: [PATCH net] net: stmmac: Fix false "invalid port speed" warning

From: Andrew Halaney
Date: Tue Aug 13 2024 - 20:43:15 EST


On Fri, Aug 09, 2024 at 10:21:39PM GMT, Serge Semin wrote:
> If the internal SGMII/TBI/RTBI PCS is available in a DW GMAC or DW QoS Eth
> instance and there is no "snps,ps-speed" property specified (or the
> plat_stmmacenet_data::mac_port_sel_speed field is left zero), then the
> next warning will be printed to the system log:
>
> > [ 294.611899] stmmaceth 1f060000.ethernet: invalid port speed
>
> By the original intention the "snps,ps-speed" property was supposed to be
> utilized on the platforms with the MAC2MAC link setup to fix the link
> speed with the specified value. But since it's possible to have a device
> with the DW *MAC with the SGMII/TBI/RTBI interface attached to a PHY, then
> the property is actually optional (which is also confirmed by the DW MAC
> DT-bindings). Thus it's absolutely normal to have the
> plat_stmmacenet_data::mac_port_sel_speed field zero initialized indicating
> that there is no need in the MAC-speed fixing and the denoted warning is
> false.
>
> Fix the warning by permitting the plat_stmmacenet_data::mac_port_sel_speed
> field to have the zero value in case if the internal PCS is available.
>
> Fixes: 02e57b9d7c8c ("drivers: net: stmmac: add port selection programming")
> Signed-off-by: Serge Semin <fancer.lancer@xxxxxxxxx>

Reviewed-by: Andrew Halaney <ahalaney@xxxxxxxxxx>