mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 05:01:27 +00:00
qla2x00t-32gbit: Backport to older kernel versions
Unbreak the build for the previous commit against kernel versions
before v4.15.
See also commit ac7fe82b6fcf ("nvme-fc: add a dev_loss_tmo field
to the remoteport") v4.15.
This commit is contained in:
@@ -2768,13 +2768,17 @@ qla2x00_get_starget_port_id(struct scsi_target *starget)
|
||||
static inline void
|
||||
qla2x00_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
fc_port_t *fcport = *(fc_port_t **)rport->dd_data;
|
||||
#endif
|
||||
|
||||
rport->dev_loss_tmo = timeout ? timeout : 1;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
if (IS_ENABLED(CONFIG_NVME_FC) && fcport && fcport->nvme_remote_port)
|
||||
nvme_fc_set_remoteport_devloss(fcport->nvme_remote_port,
|
||||
rport->dev_loss_tmo);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -83,8 +83,10 @@ int qla_nvme_register_remote(struct scsi_qla_host *vha, struct fc_port *fcport)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
nvme_fc_set_remoteport_devloss(fcport->nvme_remote_port,
|
||||
fcport->dev_loss_tmo);
|
||||
#endif
|
||||
|
||||
if (fcport->nvme_prli_service_param & NVME_PRLI_SP_SLER)
|
||||
ql_log(ql_log_info, vha, 0x212a,
|
||||
@@ -752,7 +754,7 @@ void qla_nvme_unregister_remote_port(struct fc_port *fcport)
|
||||
"%s: unregister remoteport on %p %8phN\n",
|
||||
__func__, fcport, fcport->port_name);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
if (test_bit(PFLG_DRIVER_REMOVING, &fcport->vha->pci_flags))
|
||||
nvme_fc_set_remoteport_devloss(fcport->nvme_remote_port, 0);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user