lkml.org 
[lkml]   [2018]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL for 4.4 049/162] scsi: lpfc: Fix crash after firmware flash when IO is running.
    Date
    From: James Smart <jsmart2021@gmail.com>

    [ Upstream commit 569dbe84a3e769009aa4a5d1030d000168889580 ]

    OS crashes after the completion of firmware download.

    Failure in posting SCSI SGL buffers because number of SGL buffers is
    less than total count. Some of the pending IOs are not completed by
    driver. SGL buffers for these IOs are not added back to the list.
    Pending IOs are not completed because lpfc_wq_list list is initialized
    before completion of pending IOs.

    Postpone lpfc_wq_list reinitialization by moving
    lpfc_sli4_queue_destroy() after lpfc_hba_down_post().

    Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
    Signed-off-by: James Smart <james.smart@broadcom.com>
    Reviewed-by: Hannes Reinecke <hare@suse.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    ---
    drivers/scsi/lpfc/lpfc_sli.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
    index ef43847153ea..f31ad4f5c7e5 100644
    --- a/drivers/scsi/lpfc/lpfc_sli.c
    +++ b/drivers/scsi/lpfc/lpfc_sli.c
    @@ -4101,7 +4101,6 @@ lpfc_sli4_brdreset(struct lpfc_hba *phba)

    /* Perform FCoE PCI function reset before freeing queue memory */
    rc = lpfc_pci_function_reset(phba);
    - lpfc_sli4_queue_destroy(phba);

    /* Restore PCI cmd register */
    pci_write_config_word(phba->pcidev, PCI_COMMAND, cfg_value);
    @@ -4224,6 +4223,7 @@ lpfc_sli_brdrestart_s4(struct lpfc_hba *phba)
    pci_disable_pcie_error_reporting(phba->pcidev);

    lpfc_hba_down_post(phba);
    + lpfc_sli4_queue_destroy(phba);

    return rc;
    }
    --
    2.15.1
    \
     
     \ /
      Last update: 2018-04-09 03:30    [W:4.074 / U:0.796 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site