[PATCH] ipq806x: dwmac: fix GMACs connected via SGMII fixed-link
Ansuel Smith
ansuelsmth at gmail.com
Sat May 8 08:03:52 PDT 2021
> fa731838c524 cleared the forced speed in the QSGMII PCS_ALL_CH_CTL
> register during probe, but this is only correct for GMACs that are not
> configured with fixed-link. This prevented GMACs configured with both
> phy-mode = "sgmii" and fixed-link from working properly, as discussed at
> https://github.com/openwrt/openwrt/pull/3954#issuecomment-834625090 and
> the comments that follow. Notably, this prevented all communication
> between gmac2 and the switch on the Netgear R7800.
>
> The correct behavior is to set the QSGMII PCS_ALL_CH_CTL register by
> considering the gmac's fixed-link child, setting the speed as directed by
> fixed-link if present, and otherwise clearing it as was done previously.
>
> Fixes: fa731838c524 ("ipq806x: dwmac: clear forced speed during probe")
> Signed-off-by: Mark Mentovai <mark at moxienet.com>
> Tested-by: Hannu Nyman <hannu.nyman at iki.fi>
> Run-tested: ipq806x/ubnt,unifi-ac-hd, ipq806x/netgear,r7800
> Cc: Petr Štetiar <ynezz at true.cz>
> Cc: Ansuel Smith <ansuelsmth at gmail.com>
> ---
> ...-dwmac-ipq806x-qsgmii-pcs-all-ch-ctl.patch | 62 +++++++++++++++++--
> 1 file changed, 56 insertions(+), 6 deletions(-)
>
Tested-by: Ansuel Smith <ansuelsmth at gmail.com>
I also tested this with the qca8k driver on 5.10. Also can you include
this with kernel 5.10
The patch applies without changes also for that kernel.
More information about the openwrt-devel
mailing list