mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-16 18:21:27 +00:00
qla2xxx-32gbit: Set remote port devloss timeout to 0
This patch sets remote_port_devloss value to 0. This indicates to FC-NVMe
transport that driver is unloading and transport should not retry.
Fixes: e476fe8af5ff ("scsi: qla2xxx: Fix unload when NVMe devices are configured")
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8321 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -628,7 +628,6 @@ static void qla_nvme_unregister_remote_port(struct work_struct *work)
|
||||
struct fc_port *fcport = container_of(work, struct fc_port,
|
||||
nvme_del_work);
|
||||
struct qla_nvme_rport *qla_rport, *trport;
|
||||
scsi_qla_host_t *base_vha;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_NVME_FC))
|
||||
return;
|
||||
@@ -636,25 +635,21 @@ static void qla_nvme_unregister_remote_port(struct work_struct *work)
|
||||
ql_log(ql_log_warn, NULL, 0x2112,
|
||||
"%s: unregister remoteport on %p\n",__func__, fcport);
|
||||
|
||||
base_vha = pci_get_drvdata(fcport->vha->hw->pdev);
|
||||
if (test_bit(PFLG_DRIVER_REMOVING, &base_vha->pci_flags)) {
|
||||
ql_dbg(ql_dbg_disc, fcport->vha, 0x2114,
|
||||
"%s: Notify FC-NVMe transport, set devloss=0\n",
|
||||
__func__);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
|
||||
nvme_fc_set_remoteport_devloss(fcport->nvme_remote_port, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
list_for_each_entry_safe(qla_rport, trport,
|
||||
&fcport->vha->nvme_rport_list, list) {
|
||||
if (qla_rport->fcport == fcport) {
|
||||
ql_log(ql_log_info, fcport->vha, 0x2113,
|
||||
"%s: fcport=%p\n", __func__, fcport);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
|
||||
nvme_fc_set_remoteport_devloss
|
||||
(fcport->nvme_remote_port, 0);
|
||||
#endif
|
||||
init_completion(&fcport->nvme_del_done);
|
||||
nvme_fc_unregister_remoteport(
|
||||
fcport->nvme_remote_port);
|
||||
if (nvme_fc_unregister_remoteport
|
||||
(fcport->nvme_remote_port))
|
||||
ql_log(ql_log_info, fcport->vha, 0x2114,
|
||||
"%s: Failed to unregister nvme_remote_port\n",
|
||||
__func__);
|
||||
wait_for_completion(&fcport->nvme_del_done);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user