Commit e5282a7d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI fixes from James Bottomley:
 "Five fixes, all in drivers.

  The most extensive is the target change to fix the hang in the login
  code, which involves changing timers from per login to per connection"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: stex: Fix gcc 13 warnings
  scsi: qla2xxx: Fix NULL pointer dereference in target mode
  scsi: target: iscsi: Prevent login threads from racing between each other
  scsi: target: iscsi: Remove unused transport_timer
  scsi: target: iscsi: Fix hang in the iSCSI login code
parents d1b65edf 6d074ce2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3796,6 +3796,7 @@ struct qla_qpair {
	uint64_t retry_term_jiff;
	struct qla_tgt_counters tgt_counters;
	uint16_t cpuid;
	bool cpu_mapped;
	struct qla_fw_resources fwres ____cacheline_aligned;
	struct  qla_buf_pool buf_pool;
	u32	cmd_cnt;
+3 −0
Original line number Diff line number Diff line
@@ -9426,6 +9426,9 @@ struct qla_qpair *qla2xxx_create_qpair(struct scsi_qla_host *vha, int qos,
		qpair->rsp->req = qpair->req;
		qpair->rsp->qpair = qpair;

		if (!qpair->cpu_mapped)
			qla_cpu_update(qpair, raw_smp_processor_id());

		if (IS_T10_PI_CAPABLE(ha) && ql2xenabledif) {
			if (ha->fw_attributes & BIT_4)
				qpair->difdix_supported = 1;
+3 −0
Original line number Diff line number Diff line
@@ -539,11 +539,14 @@ qla_mapq_init_qp_cpu_map(struct qla_hw_data *ha,
	if (!ha->qp_cpu_map)
		return;
	mask = pci_irq_get_affinity(ha->pdev, msix->vector_base0);
	if (!mask)
		return;
	qpair->cpuid = cpumask_first(mask);
	for_each_cpu(cpu, mask) {
		ha->qp_cpu_map[cpu] = qpair;
	}
	msix->cpuid = qpair->cpuid;
	qpair->cpu_mapped = true;
}

static inline void
+3 −0
Original line number Diff line number Diff line
@@ -3770,6 +3770,9 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha,

	if (rsp->qpair->cpuid != smp_processor_id() || !rsp->qpair->rcv_intr) {
		rsp->qpair->rcv_intr = 1;

		if (!rsp->qpair->cpu_mapped)
			qla_cpu_update(rsp->qpair, raw_smp_processor_id());
	}

#define __update_rsp_in(_is_shadow_hba, _rsp, _rsp_in)			\
+4 −0
Original line number Diff line number Diff line
@@ -109,7 +109,9 @@ enum {
	TASK_ATTRIBUTE_HEADOFQUEUE		= 0x1,
	TASK_ATTRIBUTE_ORDERED			= 0x2,
	TASK_ATTRIBUTE_ACA			= 0x4,
};

enum {
	SS_STS_NORMAL				= 0x80000000,
	SS_STS_DONE				= 0x40000000,
	SS_STS_HANDSHAKE			= 0x20000000,
@@ -121,7 +123,9 @@ enum {
	SS_I2H_REQUEST_RESET			= 0x2000,

	SS_MU_OPERATIONAL			= 0x80000000,
};

enum {
	STEX_CDB_LENGTH				= 16,
	STATUS_VAR_LEN				= 128,

Loading