mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 21:26:31 +00:00
qla2x00t-32gbit: Backport to older kernel versions
Commit ccf2e9c8fab7 ("qla2x00t-32gbit: Select qpair depending on which
CPU post_cmd() gets called") introduced an optimization based on the
pci_irq_get_affinity() API.
Due to support for older kernel versions, limit the minimum kernel
version to use this optimization to v4.9.
See also commit ee8d41e53efe ("pci/msi: Retrieve affinity for a vector") # v4.9.
This commit is contained in:
@@ -9429,6 +9429,12 @@ struct qla_qpair *qla2xxx_create_qpair(struct scsi_qla_host *vha, int qos,
|
||||
qpair->req = ha->req_q_map[req_id];
|
||||
qpair->rsp->req = qpair->req;
|
||||
qpair->rsp->qpair = qpair;
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) && \
|
||||
(!defined(RHEL_RELEASE_CODE) || \
|
||||
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(7, 5))
|
||||
/* init qpair to this cpu. Will adjust at run time. */
|
||||
qla_cpu_update(qpair, raw_smp_processor_id());
|
||||
#endif
|
||||
|
||||
if (IS_T10_PI_CAPABLE(ha) && ql2xenabledif) {
|
||||
if (ha->fw_attributes & BIT_4)
|
||||
|
||||
@@ -541,6 +541,9 @@ qla_mapq_init_qp_cpu_map(struct qla_hw_data *ha,
|
||||
struct qla_msix_entry *msix,
|
||||
struct qla_qpair *qpair)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) || \
|
||||
(defined(RHEL_RELEASE_CODE) && \
|
||||
RHEL_RELEASE_CODE -0 >= RHEL_RELEASE_VERSION(7, 5))
|
||||
const struct cpumask *mask;
|
||||
unsigned int cpu;
|
||||
|
||||
@@ -552,6 +555,7 @@ qla_mapq_init_qp_cpu_map(struct qla_hw_data *ha,
|
||||
ha->qp_cpu_map[cpu] = qpair;
|
||||
}
|
||||
msix->cpuid = qpair->cpuid;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
||||
@@ -3793,6 +3793,11 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha,
|
||||
if (rsp->qpair->cpuid != raw_smp_processor_id() ||
|
||||
!rsp->qpair->rcv_intr) {
|
||||
rsp->qpair->rcv_intr = 1;
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) && \
|
||||
(!defined(RHEL_RELEASE_CODE) || \
|
||||
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(7, 5))
|
||||
qla_cpu_update(rsp->qpair, raw_smp_processor_id());
|
||||
#endif
|
||||
}
|
||||
|
||||
#define __update_rsp_in(_is_shadow_hba, _rsp, _rsp_in) \
|
||||
|
||||
Reference in New Issue
Block a user