[PATCH 3/4] lpfc: enable FPIN notification for NVMe

Justin Tee justintee8345 at gmail.com
Tue Apr 29 14:28:28 PDT 2025


> That should rather be a 'cfg_enable_fc4_type & LPFC_ENABLE_NVME', right?
Yes, please (:

But also, something like this to ensure our NVME target driver mode is excluded:

diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index cf1fbfb15c5d..fdf4568e171e 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -10251,8 +10251,12 @@ lpfc_els_rcv_fpin(struct lpfc_vport *vport,
void *p, u32 fpin_length)
                if (deliver) {
                        fc_host_fpin_rcv(lpfc_shost_from_vport(vport),
                                         fpin_length, (char *)fpin, 0);
-                       nvme_fc_fpin_rcv(vport->localport,
-                                        fpin_length, (char *)fpin);
+#if (IS_ENABLED(CONFIG_NVME_FC))
+                       if (vport->cfg_enable_fc4_type & LPFC_ENABLE_NVME &&
+                           !phba->nvmet_support)
+                               nvme_fc_fpin_rcv(vport->localport,
+                                                fpin_length, (char *)fpin);
+#endif
                }
                desc_cnt++;
        }

Regards,
Justin



More information about the Linux-nvme mailing list