]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Jan 2021 23:58:33 +0000 (15:58 -0800)
commit3f705cd3098583e8ab779cdf4d0622f24527f1b9
treec8567656fe4c27e008e2983801d50efaa4f19372
parentc19570f8e99aec07bbaab141721b62fbde35e4dc
net: stmmac: dwmac-meson8b: fix enabling the timing-adjustment clock

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: 9917e9872f37a8 ("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>
drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c