diff options
author | Quinn Tran <qutran@marvell.com> | 2019-07-26 18:07:39 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-08-08 00:08:12 +0200 |
commit | 03cc44bf682af289d6536eb911e928b415bd0e1f (patch) | |
tree | 578140a56024e2939be0b13f220687c979ac3769 /drivers/scsi/qla2xxx/qla_nvme.c | |
parent | scsi: qla2xxx: Fix hang in fcport delete path (diff) | |
download | linux-03cc44bf682af289d6536eb911e928b415bd0e1f.tar.xz linux-03cc44bf682af289d6536eb911e928b415bd0e1f.zip |
scsi: qla2xxx: Allow NVMe IO to resume with short cable pull
Current driver report dev_loss_tmo to 0 for NVMe devices with short cable
pull. This causes NVMe controller to be freed along with NVMe namespace.
The side affect is IO would stop. By not setting dev_loss_tmo to 0, NVMe
namespace would stay until cable is plugged back in. This allows IO to
resume afterward.
[mkp: commit desc]
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_nvme.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nvme.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index 963094b3c300..af7919a5acdc 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -653,7 +653,9 @@ void qla_nvme_unregister_remote_port(struct fc_port *fcport) "%s: unregister remoteport on %p %8phN\n", __func__, fcport, fcport->port_name); - nvme_fc_set_remoteport_devloss(fcport->nvme_remote_port, 0); + if (test_bit(PFLG_DRIVER_REMOVING, &fcport->vha->pci_flags)) + nvme_fc_set_remoteport_devloss(fcport->nvme_remote_port, 0); + init_completion(&fcport->nvme_del_done); ret = nvme_fc_unregister_remoteport(fcport->nvme_remote_port); if (ret) |