Call fc_host_fpin_set_nvme_rport_marginal() to enable FPIN notifications
for NVMe.

Co-developed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Hannes Reinecke <[email protected]>
Tested-by: Bryan Gurney <[email protected]>
Signed-off-by: John Meneghini <[email protected]>
---
 drivers/scsi/lpfc/lpfc_els.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 1511cabac636..bfd9ba4552f3 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -10256,9 +10256,14 @@ lpfc_els_rcv_fpin(struct lpfc_vport *vport, void *p, 
u32 fpin_length)
                fpin_length += sizeof(struct fc_els_fpin); /* the entire FPIN */
 
                /* Send every descriptor individually to the upper layer */
-               if (deliver)
+               if (deliver) {
                        fc_host_fpin_rcv(lpfc_shost_from_vport(vport),
                                         fpin_length, (char *)fpin, 0);
+                       if (vport->cfg_enable_fc4_type & LPFC_ENABLE_NVME) {
+                               
fc_host_fpin_set_nvme_rport_marginal(lpfc_shost_from_vport(vport),
+                                                               fpin_length, 
(char *)fpin);
+                       }
+               }
                desc_cnt++;
        }
 }
-- 
2.51.0


Reply via email to