bna: fix soft lock-up during firmware initialization failure
Bug in the driver initialization causes soft-lockup if firmware initialization timeout is reached. Polling function bfa_ioc_poll_fwinit() incorrectly calls bfa_nw_iocpf_timeout() when the timeout is reached. The problem is that bfa_nw_iocpf_timeout() calls again bfa_ioc_poll_fwinit()... etc. The bfa_ioc_poll_fwinit() should directly send timeout event for iocpf and the same should be done if firmware download into HW fails. Cc: Rasesh Mody <rasesh.mody@qlogic.com> Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4918eb1e7c
commit
4818e85647
|
@ -2414,7 +2414,7 @@ bfa_ioc_boot(struct bfa_ioc *ioc, enum bfi_fwboot_type boot_type,
|
||||||
if (status == BFA_STATUS_OK)
|
if (status == BFA_STATUS_OK)
|
||||||
bfa_ioc_lpu_start(ioc);
|
bfa_ioc_lpu_start(ioc);
|
||||||
else
|
else
|
||||||
bfa_nw_iocpf_timeout(ioc);
|
bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -3029,7 +3029,7 @@ bfa_ioc_poll_fwinit(struct bfa_ioc *ioc)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ioc->iocpf.poll_time >= BFA_IOC_TOV) {
|
if (ioc->iocpf.poll_time >= BFA_IOC_TOV) {
|
||||||
bfa_nw_iocpf_timeout(ioc);
|
bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT);
|
||||||
} else {
|
} else {
|
||||||
ioc->iocpf.poll_time += BFA_IOC_POLL_TOV;
|
ioc->iocpf.poll_time += BFA_IOC_POLL_TOV;
|
||||||
mod_timer(&ioc->iocpf_timer, jiffies +
|
mod_timer(&ioc->iocpf_timer, jiffies +
|
||||||
|
|
Loading…
Reference in New Issue