Message ID | 20170805004731.1335-5-jsmart2021@gmail.com (mailing list archive) |
---|---|
State | Changes Requested, archived |
Headers | show |
On Fri, Aug 04, 2017 at 05:47:15PM -0700, James Smart wrote: > From: Dick Kennedy <dick.kennedy@broadcom.com> > > lpfc oops when it discovers a NVME target but is configured for SCSI > only operation. Oops is in lpfc_nvme_register_port+0x33/0x300. Why does it even call lpfc_nvme_register_rport if it isn't configured for handling NVMe?
On 8/7/2017 1:00 AM, Johannes Thumshirn wrote: > On Fri, Aug 04, 2017 at 05:47:15PM -0700, James Smart wrote: >> From: Dick Kennedy <dick.kennedy@broadcom.com> >> >> lpfc oops when it discovers a NVME target but is configured for SCSI >> only operation. Oops is in lpfc_nvme_register_port+0x33/0x300. > > Why does it even call lpfc_nvme_register_rport if it isn't configured for > handling NVMe? > That was the bug.... it got confused about protocol support. -- james
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index 0a0a1b92d01d..2f50df6a3dca 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -2296,6 +2296,9 @@ lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) ndlp->nlp_DID, ndlp->nlp_type); localport = vport->localport; + if (!localport) + return 0; + lport = (struct lpfc_nvme_lport *)localport->private; /* NVME rports are not preserved across devloss.