]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix receive PRLI handling
authorJames Smart <jsmart2021@gmail.com>
Sat, 9 Dec 2017 01:18:05 +0000 (17:18 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 21 Dec 2017 02:11:45 +0000 (21:11 -0500)
commit3baa2b6ea3de1bc84a3aab44c7efdfa5e2eb8ab3
treed6459b058388a25aac35fa9230c93c1060324ddd
parent4ad25a9a794a4445d72282e1dab1163603234680
scsi: lpfc: Fix receive PRLI handling

Handling a rcv'ed PRLI incorrectly can cause the ndlp to end up in the
wrong state or the driver to ACC and PRLI when it should send LS_RJT.

The cause was due to the driver not properly looking at the PRLI type
and taking the multiple protocol support into consideration.

Resolved by adding checks in the various PRLI receive points to validate
PRLI type and reject if not valid for the enabled protocols and mode
(host vs target).

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_nportdisc.c