scsi: lpfc: Fix nvme sg_seg_cnt display if HBA does not support NVME
authorJames Smart <jsmart2021@gmail.com>
Wed, 14 Aug 2019 23:56:57 +0000 (16:56 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 20 Aug 2019 02:41:10 +0000 (22:41 -0400)
The driver is currently reporting a non-zero nvme sg_seg_cnt value of 256
when nvme is disabled. It should be zero.

Fix by ensuring the value is cleared.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_init.c

index 8c0fb9baf723c98553f876dfbe1b478248cc2855..f1e1e8faaec1c781f6ddfce6e1ab36b648331445 100644 (file)
@@ -11676,6 +11676,7 @@ fcponly:
                        phba->nvme_support = 0;
                        phba->nvmet_support = 0;
                        phba->cfg_nvmet_mrq = 0;
+                       phba->cfg_nvme_seg_cnt = 0;
 
                        /* If no FC4 type support, move to just SCSI support */
                        if (!(phba->cfg_enable_fc4_type & LPFC_ENABLE_FCP))