OSDN Git Service

scsi: lpfc: Fix host hang at boot or slow boot
authorJames Smart <jsmart2021@gmail.com>
Sun, 22 Sep 2019 03:58:58 +0000 (20:58 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 1 Oct 2019 02:07:10 +0000 (22:07 -0400)
commit24c7c0a6d3de68b6e15532d18749e561d260c160
tree2e78cc45bfad69864081a131b2f72f2ede747467
parent43bfea1bffb6b01089c2fe483ede1b036e166579
scsi: lpfc: Fix host hang at boot or slow boot

Scenarios were seen where a host hung when the system booted or the host
was very slow in booting. The link would not come up and no luns were
visible to the host.

After investigation, this was found to be due to the introduction of a new
ACQE that adapter may generate to report a adapter hw warning. The ACQE was
delivered to the driver very early in adapter initialization, when the
driver did not expect command completion. As part of handling this
unexpected interrupt the an EQEs are consumed and discarded and the EQ
rearmed. The issue is the CQ that cause the EQE and thus the interrupt was
not processed and the CQ was left unarmed. Meaning it would no longer
generate a new interrupt condition. Subsequent mailbox commands used to
initialize the adapter use the same CQ, and as there was no completion
interrupt generated, the driver never saw the mailbox commands complete and
it would wait long command timeouts.

Fix by having the early flush routine also process the related CQ and rearm
the CQ.

Link: https://lore.kernel.org/r/20190922035906.10977-13-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c