Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4697d9a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI fixes from James Bottomley:
 "A set of very minor fixes and a couple of reverts to fix a major
  problem (the attempt to change the busy count causes a hang when
  attempting to change the drive cache type)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: aacraid: fix a signedness bug
  Revert "scsi: core: avoid host-wide host_busy counter for scsi_mq"
  Revert "scsi: core: fix scsi_host_queue_ready"
  scsi: libata: Add missing newline at end of file
  scsi: target: iscsi: cxgbit: use pr_debug() instead of pr_info()
  scsi: hpsa: limit transfer length to 1MB, not 512kB
  scsi: lpfc: Correct MDS diag and nvmet configuration
  scsi: lpfc: Default fdmi_on to on
  scsi: csiostor: fix incorrect port capabilities
  scsi: csiostor: add a check for NULL pointer after kmalloc()
  scsi: documentation: add scsi_mod.use_blk_mq to scsi-parameters
  scsi: core: Update SCSI_MQ_DEFAULT help text to match default
parents d0c1db1d b9eb3b14
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -97,6 +97,11 @@ parameters may be changed at runtime by the command
			allowing boot to proceed.  none ignores them, expecting
			user space to do the scan.

	scsi_mod.use_blk_mq=
			[SCSI] use blk-mq I/O path by default
			See SCSI_MQ_DEFAULT in drivers/scsi/Kconfig.
			Format: <y/n>

	sim710=		[SCSI,HW]
			See header of drivers/scsi/sim710.c.

+5 −5
Original line number Diff line number Diff line
@@ -52,12 +52,12 @@ config SCSI_MQ_DEFAULT
	default y
	depends on SCSI
	---help---
	  This option enables the new blk-mq based I/O path for SCSI
	  devices by default.  With the option the scsi_mod.use_blk_mq
	  module/boot option defaults to Y, without it to N, but it can
	  still be overridden either way.
	  This option enables the blk-mq based I/O path for SCSI devices by
	  default.  With this option the scsi_mod.use_blk_mq module/boot
	  option defaults to Y, without it to N, but it can still be
	  overridden either way.

	  If unsure say N.
	  If unsure say Y.

config SCSI_PROC_FS
	bool "legacy /proc/scsi/ support"
+1 −1
Original line number Diff line number Diff line
@@ -1346,7 +1346,7 @@ struct fib {
struct aac_hba_map_info {
	__le32	rmw_nexus;		/* nexus for native HBA devices */
	u8		devtype;	/* device type */
	u8		reset_state;	/* 0 - no reset, 1..x - */
	s8		reset_state;	/* 0 - no reset, 1..x - */
					/* after xth TM LUN reset */
	u16		qd_limit;
	u32		scan_counter;
+53 −18
Original line number Diff line number Diff line
@@ -1601,6 +1601,46 @@ fw_port_cap32_t fwcaps16_to_caps32(fw_port_cap16_t caps16)
	return caps32;
}

/**
 *	fwcaps32_to_caps16 - convert 32-bit Port Capabilities to 16-bits
 *	@caps32: a 32-bit Port Capabilities value
 *
 *	Returns the equivalent 16-bit Port Capabilities value.  Note that
 *	not all 32-bit Port Capabilities can be represented in the 16-bit
 *	Port Capabilities and some fields/values may not make it.
 */
fw_port_cap16_t fwcaps32_to_caps16(fw_port_cap32_t caps32)
{
	fw_port_cap16_t caps16 = 0;

	#define CAP32_TO_CAP16(__cap) \
		do { \
			if (caps32 & FW_PORT_CAP32_##__cap) \
				caps16 |= FW_PORT_CAP_##__cap; \
		} while (0)

	CAP32_TO_CAP16(SPEED_100M);
	CAP32_TO_CAP16(SPEED_1G);
	CAP32_TO_CAP16(SPEED_10G);
	CAP32_TO_CAP16(SPEED_25G);
	CAP32_TO_CAP16(SPEED_40G);
	CAP32_TO_CAP16(SPEED_100G);
	CAP32_TO_CAP16(FC_RX);
	CAP32_TO_CAP16(FC_TX);
	CAP32_TO_CAP16(802_3_PAUSE);
	CAP32_TO_CAP16(802_3_ASM_DIR);
	CAP32_TO_CAP16(ANEG);
	CAP32_TO_CAP16(FORCE_PAUSE);
	CAP32_TO_CAP16(MDIAUTO);
	CAP32_TO_CAP16(MDISTRAIGHT);
	CAP32_TO_CAP16(FEC_RS);
	CAP32_TO_CAP16(FEC_BASER_RS);

	#undef CAP32_TO_CAP16

	return caps16;
}

/**
 *      lstatus_to_fwcap - translate old lstatus to 32-bit Port Capabilities
 *      @lstatus: old FW_PORT_ACTION_GET_PORT_INFO lstatus value
@@ -1759,7 +1799,7 @@ csio_enable_ports(struct csio_hw *hw)
			val = 1;

			csio_mb_params(hw, mbp, CSIO_MB_DEFAULT_TMO,
				       hw->pfn, 0, 1, &param, &val, false,
				       hw->pfn, 0, 1, &param, &val, true,
				       NULL);

			if (csio_mb_issue(hw, mbp)) {
@@ -1769,16 +1809,9 @@ csio_enable_ports(struct csio_hw *hw)
				return -EINVAL;
			}

			csio_mb_process_read_params_rsp(hw, mbp, &retval, 1,
							&val);
			if (retval != FW_SUCCESS) {
				csio_err(hw, "FW_PARAMS_CMD(r) port:%d failed: 0x%x\n",
					 portid, retval);
				mempool_free(mbp, hw->mb_mempool);
				return -EINVAL;
			}

			fw_caps = val;
			csio_mb_process_read_params_rsp(hw, mbp, &retval,
							0, NULL);
			fw_caps = retval ? FW_CAPS16 : FW_CAPS32;
		}

		/* Read PORT information */
@@ -2364,8 +2397,8 @@ static int csio_hw_prep_fw(struct csio_hw *hw, struct fw_info *fw_info,
}

/*
 * Returns -EINVAL if attempts to flash the firmware failed
 * else returns 0,
 * Returns -EINVAL if attempts to flash the firmware failed,
 * -ENOMEM if memory allocation failed else returns 0,
 * if flashing was not attempted because the card had the
 * latest firmware ECANCELED is returned
 */
@@ -2393,6 +2426,13 @@ csio_hw_flash_fw(struct csio_hw *hw, int *reset)
		return -EINVAL;
	}

	/* allocate memory to read the header of the firmware on the
	 * card
	 */
	card_fw = kmalloc(sizeof(*card_fw), GFP_KERNEL);
	if (!card_fw)
		return -ENOMEM;

	if (csio_is_t5(pci_dev->device & CSIO_HW_CHIP_MASK))
		fw_bin_file = FW_FNAME_T5;
	else
@@ -2406,11 +2446,6 @@ csio_hw_flash_fw(struct csio_hw *hw, int *reset)
		fw_size = fw->size;
	}

	/* allocate memory to read the header of the firmware on the
	 * card
	 */
	card_fw = kmalloc(sizeof(*card_fw), GFP_KERNEL);

	/* upgrade FW logic */
	ret = csio_hw_prep_fw(hw, fw_info, fw_data, fw_size, card_fw,
			 hw->fw_state, reset);
+1 −0
Original line number Diff line number Diff line
@@ -639,6 +639,7 @@ int csio_handle_intr_status(struct csio_hw *, unsigned int,

fw_port_cap32_t fwcap_to_fwspeed(fw_port_cap32_t acaps);
fw_port_cap32_t fwcaps16_to_caps32(fw_port_cap16_t caps16);
fw_port_cap16_t fwcaps32_to_caps16(fw_port_cap32_t caps32);
fw_port_cap32_t lstatus_to_fwcap(u32 lstatus);

int csio_hw_start(struct csio_hw *);
Loading