]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: stmmac: qcom-ethqos: enable SGMII loopback during DMA reset on sa8775p-ride-r3
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 3 Jul 2024 18:14:59 +0000 (20:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:11 +0000 (15:34 +0200)
commite7279593a1e220fa48c23b5fd475d3839d0ed7ae
tree714b8704e75c7909e63b0d226a239c91046f6ba5
parent2406fa2adfc7b278138ec90c16d3244150157ad1
net: stmmac: qcom-ethqos: enable SGMII loopback during DMA reset on sa8775p-ride-r3

[ Upstream commit 3c466d6537b99f801b3f68af3d8124d4312437a0 ]

On sa8775p-ride-r3 the RX clocks from the AQR115C PHY are not available at
the time of the DMA reset. We can however extract the RX clock from the
internal SERDES block. Once the link is up, we can revert to the
previous state.

The AQR115C PHY doesn't support in-band signalling so we can count on
getting the link up notification and safely reuse existing callbacks
which are already used by another HW quirk workaround which enables the
functional clock to avoid a DMA reset due to timeout.

Only enable loopback on revision 3 of the board - check the phy_mode to
make sure.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20240703181500.28491-3-brgl@bgdev.pl
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c