Commit a145fda3 authored by Dick Kennedy's avatar Dick Kennedy Committed by Martin K. Petersen

scsi: lpfc: Fix nvme target failure after 2nd adapter reset

The nonrecovery occurred because the lpfc nvme initiator function did
not reestablish its localport creation with the nvme host transport in
lpfc_oneline.  Because of that, an NVME rport binding could not take
place.

Corrected by recreating the localport in the adapter reset recovery
routine.
Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent c6e0c925
...@@ -3047,7 +3047,7 @@ lpfc_online(struct lpfc_hba *phba) ...@@ -3047,7 +3047,7 @@ lpfc_online(struct lpfc_hba *phba)
{ {
struct lpfc_vport *vport; struct lpfc_vport *vport;
struct lpfc_vport **vports; struct lpfc_vport **vports;
int i; int i, error = 0;
bool vpis_cleared = false; bool vpis_cleared = false;
if (!phba) if (!phba)
...@@ -3071,6 +3071,18 @@ lpfc_online(struct lpfc_hba *phba) ...@@ -3071,6 +3071,18 @@ lpfc_online(struct lpfc_hba *phba)
if (!phba->sli4_hba.max_cfg_param.vpi_used) if (!phba->sli4_hba.max_cfg_param.vpi_used)
vpis_cleared = true; vpis_cleared = true;
spin_unlock_irq(&phba->hbalock); spin_unlock_irq(&phba->hbalock);
/* Reestablish the local initiator port.
* The offline process destroyed the previous lport.
*/
if (phba->cfg_enable_fc4_type & LPFC_ENABLE_NVME &&
!phba->nvmet_support) {
error = lpfc_nvme_create_localport(phba->pport);
if (error)
lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
"6132 NVME restore reg failed "
"on nvmei error x%x\n", error);
}
} else { } else {
lpfc_sli_queue_init(phba); lpfc_sli_queue_init(phba);
if (lpfc_sli_hba_setup(phba)) { /* Initialize SLI2/SLI3 HBA */ if (lpfc_sli_hba_setup(phba)) { /* Initialize SLI2/SLI3 HBA */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment