From: James Smart Date: Thu, 21 May 2015 17:55:22 +0000 (-0400) Subject: lpfc: Correct reporting of vport state on fdisc command failure. X-Git-Tag: v4.1.12-92~249^2~3^2~28 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=37b3d7bdf06bd6e3e646f3f863c5958d11bbe423;p=users%2Fjedix%2Flinux-maple.git lpfc: Correct reporting of vport state on fdisc command failure. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: James Bottomley (cherry picked from commit c84163d179e561613472a4ee479eb67ba2771177) Orabug: 22029622 From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz Acked-by: Chuck Anderson --- diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index a3b37ade5cb45..2f6a6079c7d14 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -7588,7 +7588,8 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, lpfc_do_scr_ns_plogi(phba, vport); goto out; fdisc_failed: - lpfc_vport_set_state(vport, FC_VPORT_FAILED); + if (vport->fc_vport->vport_state != FC_VPORT_NO_FABRIC_RSCS) + lpfc_vport_set_state(vport, FC_VPORT_FAILED); /* Cancel discovery timer */ lpfc_can_disctmo(vport); lpfc_nlp_put(ndlp);