OSDN Git Service

scsi: lpfc: correct nvme sg segment count check
authorJames Smart <jsmart2021@gmail.com>
Sat, 30 Sep 2017 00:34:46 +0000 (17:34 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 3 Oct 2017 02:46:42 +0000 (22:46 -0400)
commit29bfd55a9c8b8e70c3ecbc5a378cb6c2fc98dc37
tree147d32a145b2cb7348eb8e12a7b7386b44e328bc
parent1abcb3718b082d359647ab67197f3ad3b419f274
scsi: lpfc: correct nvme sg segment count check

The internal cfg flag is actually smaller, by 1 (for a partial page
sge), than the sg list maintained by the driver. Thus the check on sg
segments errored out when it shouldn't have

Ensure the check is +1

Note: having a value that is less than what it really is is bogus.
Correcting it now would be a significant rework. Add this item to the
list to be refactored in the merge with efct.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_nvme.c