scsi: lpfc: Cap NPIV vports to 256
authorJames Smart <jsmart2021@gmail.com>
Fri, 30 Nov 2018 00:09:33 +0000 (16:09 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 09:42:14 +0000 (10:42 +0100)
commitafb5d83f04870f28f1b7f7100303a4c9d0fa51b7
treea24cb25fdb8f3cbe0cdb7ac16b05969a4d5e7d49
parent26a999b2ade84583d194c0f9360558b1774581f5
scsi: lpfc: Cap NPIV vports to 256

[ Upstream commit 8b47ae69e049ae0b3373859d901f0334322f9fe9 ]

Depending on the chipset, the number of NPIV vports may vary and be in
excess of what most switches support (256). To avoid confusion with the
users, limit the reported NPIV vports to 256.

Additionally correct the 16G adapter which is reporting a bogus NPIV vport
number if the link is down.

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/lpfc/lpfc.h
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_init.c