OSDN Git Service

scsi: lpfc: Fix sg_seg_cnt for HBAs that don't support NVME
authorJames Smart <jsmart2021@gmail.com>
Wed, 14 Aug 2019 23:56:49 +0000 (16:56 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 20 Aug 2019 02:41:10 +0000 (22:41 -0400)
commitc26c265b168bb09013922846a51447603bcdfdc4
tree25885b960dc44004828142a9290848e46f28ed8b
parenta643c6de1441e5cdab88452c46fe7c38b318009e
scsi: lpfc: Fix sg_seg_cnt for HBAs that don't support NVME

On an SLI-3 adapter which does not support NVMe, but with the driver global
attribute to enable nvme on any adapter if it does support NVMe
(e.g. module parameter lpfc_enable_fc4_type=3), the SGL and total SGE
values are being munged by the protocol enablement when it shouldn't be.

Correct by changing the location of where the NVME sgl information is being
applied, which will avoid any SLI-3-based adapter.

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_attr.c
drivers/scsi/lpfc/lpfc_init.c