During port start, driver enables interrupts. At the end of port start
driver schedules the alarm for fw health check. This can cause race
between interrupt handler and schedule fw health check alarm thread
which falsely detects FW error.
Fixes:
9d0cbaecc91a ("net/bnxt: support periodic FW health monitoring")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
bp->flags |= BNXT_FLAG_INIT_DONE;
eth_dev->data->dev_started = 1;
bp->dev_stopped = 0;
+ pthread_mutex_lock(&bp->def_cp_lock);
bnxt_schedule_fw_health_check(bp);
+ pthread_mutex_unlock(&bp->def_cp_lock);
return 0;
error: