• James Smart's avatar
    scsi: lpfc: Fix host hang at boot or slow boot · 24c7c0a6
    James Smart authored
    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.comSigned-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
    Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    24c7c0a6
lpfc_sli.c 625 KB