net: stmmac: dwmac-meson8b: fix enabling the timing-adjustment clock
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Wed, 6 Jan 2021 13:42:48 +0000 (14:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:37:22 +0000 (11:37 +0100)
commitef1efead3f2ac52460a39fd171ed5cfa9a83773e
tree9c7f542b992cf90481846e45ec5e713a319c9cd6
parent106c902da8a6d01e744b08820741409eee6935da
net: stmmac: dwmac-meson8b: fix enabling the timing-adjustment clock

[ Upstream commit 025822884a4fd2d0af51dcf77ddc494e60c5ff63 ]

The timing-adjustment clock only has to be enabled when a) there is a
2ns RX delay configured using device-tree and b) the phy-mode indicates
that the RX delay should be enabled.

Only enable the RX delay if both are true, instead of (by accident) also
enabling it when there's the 2ns RX delay configured but the phy-mode
incicates that the RX delay is not used.

Fixes: 9308c47640d515 ("net: stmmac: dwmac-meson8b: add support for the RX delay configuration")
Reported-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c