immortalwrt/target
Mark Mentovai 63e8f6fc68 ipq806x: dwmac: fix GMACs connected via SGMII fixed-link
fa731838c5 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: fa731838c5 ("ipq806x: dwmac: clear forced speed during probe")
Signed-off-by: Mark Mentovai <mark@moxienet.com>
Tested-by: Hannu Nyman <hannu.nyman@iki.fi>
Run-tested: ipq806x/ubnt,unifi-ac-hd, ipq806x/netgear,r7800
Cc: Petr Štetiar <ynezz@true.cz>
Cc: Ansuel Smith <ansuelsmth@gmail.com>
Tested-by:  Ansuel Smith <ansuelsmth@gmail.com>
2021-05-11 23:31:59 +08:00
..
imagebuilder imagebuilder: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archive 2021-05-09 00:35:59 +08:00
linux ipq806x: dwmac: fix GMACs connected via SGMII fixed-link 2021-05-11 23:31:59 +08:00
sdk sdk: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archives 2021-05-09 00:36:17 +08:00
toolchain build: improve ccache support 2021-01-02 12:08:17 +08:00
Config.in include/image*: add support for device-tree overlays 2021-03-18 23:23:45 +08:00
Makefile