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>
"%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)