aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Vecera <ivecera@redhat.com>2015-05-28 17:10:08 -0400
committerDavid S. Miller <davem@davemloft.net>2015-05-31 02:46:49 -0400
commit4818e856475b309667ee38d4d0f2e3c1b933feef (patch)
tree8dd69b9c3ec2b97768a1872767389e394b50f26f
parent4918eb1e7cd3b8a41ebf56b5fabaa334139b919f (diff)
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>
-rw-r--r--drivers/net/ethernet/brocade/bna/bfa_ioc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
index 594a2ab36d31..68f3c13c9ef6 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
@@ -2414,7 +2414,7 @@ bfa_ioc_boot(struct bfa_ioc *ioc, enum bfi_fwboot_type boot_type,
2414 if (status == BFA_STATUS_OK) 2414 if (status == BFA_STATUS_OK)
2415 bfa_ioc_lpu_start(ioc); 2415 bfa_ioc_lpu_start(ioc);
2416 else 2416 else
2417 bfa_nw_iocpf_timeout(ioc); 2417 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT);
2418 2418
2419 return status; 2419 return status;
2420} 2420}
@@ -3029,7 +3029,7 @@ bfa_ioc_poll_fwinit(struct bfa_ioc *ioc)
3029 } 3029 }
3030 3030
3031 if (ioc->iocpf.poll_time >= BFA_IOC_TOV) { 3031 if (ioc->iocpf.poll_time >= BFA_IOC_TOV) {
3032 bfa_nw_iocpf_timeout(ioc); 3032 bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT);
3033 } else { 3033 } else {
3034 ioc->iocpf.poll_time += BFA_IOC_POLL_TOV; 3034 ioc->iocpf.poll_time += BFA_IOC_POLL_TOV;
3035 mod_timer(&ioc->iocpf_timer, jiffies + 3035 mod_timer(&ioc->iocpf_timer, jiffies +