]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Fix rejected nvme LS Req.
authorJames Smart <jsmart2021@gmail.com>
Fri, 21 Apr 2017 23:04:47 +0000 (16:04 -0700)
committerChristoph Hellwig <hch@lst.de>
Mon, 24 Apr 2017 07:25:48 +0000 (09:25 +0200)
commitba43c4d0fe5ab053c058fd7e2402eb8ba1c41074
treed956cab15a546877a8179dcd63dce8bdee6efae2
parent975ff31c77348c567b4c12418d456446c50006dd
Fix rejected nvme LS Req.

In this case, the NVME initiator is sending an LS REQ command on an NDLP
that is not MAPPED.  The FW rejects it.

The lpfc_nvme_ls_req routine checks for a NULL ndlp pointer
but does not check the NDLP state.  This allows the routine
to send an LS IO when the ndlp is disconnected.

Check the ndlp for NULL, actual node, Target and MAPPED
or Initiator and UNMAPPED. This avoids Fabric nodes getting
the Create Association or Create Connection commands.  Initiators
are free to Reject either Create.
Also some of the messages numbers in lpfc_nvme_ls_req were changed because
they were already used in other log messages.

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