• Jonas Bonn's avatar
    ethoc: rework mdio read/write · 8dac428a
    Jonas Bonn authored
    MDIO read and write were checking whether a timeout had expired to determine
    whether to recheck the result of the MDIO operation.  Under heavy CPU usage,
    however, it was possible for the timeout to expire before the routine got
    around to be able to check a second time even, thus erroneousy returning an
    -EBUSY.
    
    This patch changes the the MDIO IO routines to try up to five times to complete
    the operation before giving up, thus lessening the dependency on CPU load.
    
    This resolves a problem whereby a ping flood would keep the CPU so busy that
    the above problem would manifest itself; the MDIO command to check link status
    would fail and the interface would erroneously be shut down.
    Signed-off-by: default avatarJonas Bonn <jonas@southpole.se>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8dac428a
ethoc.c 28.6 KB