• S
    mlxsw: core: Increase timeout during firmware flash process · af93ac09
    Shalom Toledo 提交于
    [ Upstream commit cf0b70e71b32137ccf9c1f3dd9fb30cbf89b4322 ]
    
    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: NShalom Toledo <shalomt@mellanox.com>
    Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    af93ac09
spectrum.c 141.4 KB