diff options
author | Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> | 2021-04-15 17:37:48 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-16 15:24:18 -0700 |
commit | c5d66587b8900201e1530b7c18d41e87bd5812f4 (patch) | |
tree | ef9f543739775393232be5240f90fd18f9b57db6 /drivers/platform | |
parent | c133acf38ca4ab498d0bfa25f3c218c263f6664a (diff) |
net: ethernet: mediatek: ppe: fix busy wait loop
The intention is for the loop to timeout if the body does not succeed.
The current logic calls time_is_before_jiffies(timeout) which is false
until after the timeout, so the loop body never executes.
Fix by using readl_poll_timeout as a more standard and less error-prone
solution.
Fixes: ba37b7caf1ed ("net: ethernet: mtk_eth_soc: add support for initializing the PPE")
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Cc: Felix Fietkau <nbd@nbd.name>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/platform')
0 files changed, 0 insertions, 0 deletions