]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Correct driver deregistrations with host nvme transport
authorJames Smart <jsmart2021@gmail.com>
Tue, 21 Nov 2017 00:00:40 +0000 (16:00 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 5 Dec 2017 01:32:54 +0000 (20:32 -0500)
commit670057810a223187ef7883e063f740d5d04e4488
treeac974757bc9682ef557f4d957fc8d1fd368f671a
parentf4d9bb7ab25ab72677a5a6d51db5b83f809a8d26
scsi: lpfc: Correct driver deregistrations with host nvme transport

The driver's interaction with the host nvme transport has been incorrect
for a while. The driver did not wait for the unregister callbacks
(waited only 5 jiffies). Thus the driver may remove objects that may be
referenced by subsequent abort commands from the transport, and the
actual unregister callback was effectively a noop. This was especially
problematic if the driver was unloaded.

The driver now waits for the unregister callbacks, as it should, before
continuing with teardown.

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