1
0
Fork 0

net: dsa: mv88e6xxx: add delay in direct SMI wait

The mv88e6xxx_smi_direct_wait routine is used to wait on indirect
registers access. It is of no exception and must delay between read
attempts, like other wait routines.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
alistair/sunxi64-5.4-dsi
Vivien Didelot 2019-08-09 18:47:59 -04:00 committed by David S. Miller
parent 1c6463b6fc
commit eede236112
1 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,8 @@ static int mv88e6xxx_smi_direct_wait(struct mv88e6xxx_chip *chip,
if (!!(data & BIT(bit)) == !!val)
return 0;
usleep_range(1000, 2000);
}
return -ETIMEDOUT;