]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: dwmac-meson8b: fix the RX delay validation
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Tue, 19 Jan 2021 20:24:24 +0000 (21:24 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 Jan 2021 06:15:08 +0000 (22:15 -0800)
commitc2b5121eefe1169b59fb708c3d5a62f806f12b1a
tree9157677e60aa858ccf7394d7529b63586c7f046b
parentf6ebf63e8470c2c059dfc60326acb8247d7db73b
net: stmmac: dwmac-meson8b: fix the RX delay validation

When has_prg_eth1_rgmii_rx_delay is true then we support RX delays
between 0ps and 3000ps in 200ps steps. Swap the validation of the RX
delay based on the has_prg_eth1_rgmii_rx_delay flag so the 200ps check
is now applied correctly on G12A SoCs (instead of only allow 0ps or
2000ps on G12A, but 0..3000ps in 200ps steps on older SoCs which don't
support that).

Fixes: 47ce71db60180a ("net: stmmac: dwmac-meson8b: add support for the RGMII RX delay on G12A")
Reported-by: Martijn van Deventer <martijn@martijnvandeventer.nl>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20210119202424.591349-1-martin.blumenstingl@googlemail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c