• Pavan Chebbi's avatar
    bnxt_en: Improve wait for firmware commands completion · 80a9641f
    Pavan Chebbi authored
    In situations where FW has crashed, the bnxt_hwrm_do_send_msg() call
    will have to wait until timeout for each firmware message.  This
    generally takes about half a second for each firmware message.  If we
    try to unload the driver n this state, the unload sequence will take
    a long time to complete.
    
    Improve this by checking the health register if it is available and
    abort the wait for the firmware response if the register shows that
    firmware is not healthy.  The very first message HWRM_VER_GET is
    excluded from this check because that message is used to poll for
    firmware to come out of reset during error recovery.
    Signed-off-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
    Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    80a9641f
bnxt.c 350 KB