OSDN Git Service

scsi: lpfc: Fix issuing init_vpi mbox on SLI-3 card
authorJames Smart <jsmart2021@gmail.com>
Wed, 14 Aug 2019 23:56:40 +0000 (16:56 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 20 Aug 2019 02:41:09 +0000 (22:41 -0400)
commit08180db2542b94e93cbdffd2a42cac2db147114a
tree197f0d4c80e12b3553bcbac7fbd19e2047f6b07b
parent26d824ca45a80f7a95e7afe578e54680cef5236f
scsi: lpfc: Fix issuing init_vpi mbox on SLI-3 card

The driver is inadvertently trying to issue an INIT_VPI mailbox command on
an SLI-3 driver. The command is specific to SLI-4. When the call is made to
send the command, if on an SLI-3 adapter, an array pointer is NULL and the
driver will oops.

Fix by restricting the command to SLI-4 adapters only.

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_vport.c