• A
    dsa: mv88e6xxx: Timeout based on iterations, not time · 6441e669
    Andrew Lunn 提交于
    The mv88e6xxx driver times out operations on the switch based on
    looping until an elapsed wall clock time is reached. However, if
    usleep_range() sleeps much longer than expected, it could timeout with
    an error without actually checking to see if the devices has completed
    the operation. So replace the elapsed time with a fixed upper bound on
    the number of loops.
    
    Testing on various switches has shown that switches takes either 0 or
    1 iteration, so a maximum of 16 iterations is a safe limit.
    Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    6441e669
chip.c 97.0 KB