• Shalom Toledo's avatar
    mlxsw: core: Increase timeout during firmware flash process · cf0b70e7
    Shalom Toledo authored
    During the firmware flash process, some of the EMADs get timed out, which
    causes the driver to send them again with a limit of 5 retries. There are
    some situations in which 5 retries is not enough and the EMAD access fails.
    If the failed EMAD was related to the flashing process, the driver fails
    the flashing.
    
    The reason for these timeouts during firmware flashing is cache misses in
    the CPU running the firmware. In case the CPU needs to fetch instructions
    from the flash when a firmware is flashed, it needs to wait for the
    flashing to complete. Since flashing takes time, it is possible for pending
    EMADs to timeout.
    
    Fix by increasing EMADs' timeout while flashing firmware.
    
    Fixes: ce6ef68f ("mlxsw: spectrum: Implement the ethtool flash_device callback")
    Signed-off-by: default avatarShalom Toledo <shalomt@mellanox.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    cf0b70e7
spectrum.c 146 KB