Commit 62e6e594 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI updates from James Bottomley:
 "Updates to the usual drivers (qla2xxx, lpfc, ufs, hisi_sas, mpi3mr,
  mpt3sas, target). The biggest change (from my biased viewpoint) being
  that the mpi3mr now attached to the SAS transport class, making it the
  first fusion type device to do so.

  Beyond the usual bug fixing and security class reworks, there aren't a
  huge number of core changes"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (141 commits)
  scsi: iscsi: iscsi_tcp: Fix null-ptr-deref while calling getpeername()
  scsi: mpi3mr: Remove unnecessary cast
  scsi: stex: Properly zero out the passthrough command structure
  scsi: mpi3mr: Update driver version to 8.2.0.3.0
  scsi: mpi3mr: Fix scheduling while atomic type bug
  scsi: mpi3mr: Scan the devices during resume time
  scsi: mpi3mr: Free enclosure objects during driver unload
  scsi: mpi3mr: Handle 0xF003 Fault Code
  scsi: mpi3mr: Graceful handling of surprise removal of PCIe HBA
  scsi: mpi3mr: Schedule IRQ kthreads only on non-RT kernels
  scsi: mpi3mr: Support new power management framework
  scsi: mpi3mr: Update mpi3 header files
  scsi: mpt3sas: Revert "scsi: mpt3sas: Fix ioc->base_readl() use"
  scsi: mpt3sas: Revert "scsi: mpt3sas: Fix writel() use"
  scsi: wd33c93: Remove dead code related to the long-gone config WD33C93_PIO
  scsi: core: Add I/O timeout count for SCSI device
  scsi: qedf: Populate sysfs attributes for vport
  scsi: pm8001: Replace one-element array with flexible-array member
  scsi: 3w-xxxx: Replace one-element array with flexible-array member
  scsi: hptiop: Replace one-element array with flexible-array member in struct hpt_iop_request_ioctl_command()
  ...
parents e08466a7 57569c37
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
@@ -1417,6 +1417,15 @@ Description: This node is used to set or display whether UFS WriteBooster is
		platform that doesn't support UFSHCD_CAP_CLK_SCALING, we can
		disable/enable WriteBooster through this sysfs node.

What:		/sys/bus/platform/drivers/ufshcd/*/enable_wb_buf_flush
What:		/sys/bus/platform/devices/*.ufs/enable_wb_buf_flush
Date:		July 2022
Contact:	Jinyoung Choi <j-young.choi@samsung.com>
Description:	This entry shows the status of WriteBooster buffer flushing
		and it can be used to enable or disable the flushing.
		If flushing is enabled, the device executes the flush
		operation when the command queue is empty.

What:		/sys/bus/platform/drivers/ufshcd/*/device_descriptor/hpb_version
What:		/sys/bus/platform/devices/*.ufs/device_descriptor/hpb_version
Date:		June 2021
@@ -1591,6 +1600,43 @@ Description: This entry shows the status of HPB.

		The file is read only.

Contact:	Daniil Lunev <dlunev@chromium.org>
What:		/sys/bus/platform/drivers/ufshcd/*/capabilities/
What:		/sys/bus/platform/devices/*.ufs/capabilities/
Date:		August 2022
Description:	The group represents the effective capabilities of the
		host-device pair. i.e. the capabilities which are enabled in the
		driver for the specific host controller, supported by the host
		controller and are supported and/or have compatible
		configuration on the device side.

Contact:	Daniil Lunev <dlunev@chromium.org>
What:		/sys/bus/platform/drivers/ufshcd/*/capabilities/clock_scaling
What:		/sys/bus/platform/devices/*.ufs/capabilities/clock_scaling
Date:		August 2022
Contact:	Daniil Lunev <dlunev@chromium.org>
Description:	Indicates status of clock scaling.

		== ============================
		0  Clock scaling is not supported.
		1  Clock scaling is supported.
		== ============================

		The file is read only.

What:		/sys/bus/platform/drivers/ufshcd/*/capabilities/write_booster
What:		/sys/bus/platform/devices/*.ufs/capabilities/write_booster
Date:		August 2022
Contact:	Daniil Lunev <dlunev@chromium.org>
Description:	Indicates status of Write Booster.

		== ============================
		0  Write Booster can not be enabled.
		1  Write Booster can be enabled.
		== ============================

		The file is read only.

What:		/sys/class/scsi_device/*/device/hpb_param_sysfs/activation_thld
Date:		February 2021
Contact:	Avri Altman <avri.altman@wdc.com>
+1 −1
Original line number Diff line number Diff line
@@ -401,7 +401,7 @@ Changes from 20041213 to 20041220
	  structure.
	* Integrated patch from Christoph Hellwig <hch@lst.de> Kill
	  compile warnings on 64 bit platforms: %variables for %llx format
	  specifiers must be caste to long long because %(u)int64_t can
	  specifiers must be cast to long long because %(u)int64_t can
	  just be long on 64bit platforms.
	* Integrated patch from Christoph Hellwig <hch@lst.de> Removes
	  dead code.
+2 −4
Original line number Diff line number Diff line
@@ -620,7 +620,6 @@ __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
	mpt_ioctl_header __user *uhdr = (void __user *) arg;
	mpt_ioctl_header	 khdr;
	int iocnum;
	unsigned iocnumX;
	int nonblock = (file->f_flags & O_NONBLOCK);
	int ret;
@@ -634,12 +633,11 @@ __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
	}
	ret = -ENXIO;				/* (-6) No such device or address */

	/* Verify intended MPT adapter - set iocnum and the adapter
	/* Verify intended MPT adapter - set iocnumX and the adapter
	 * pointer (iocp)
	 */
	iocnumX = khdr.iocnum & 0xFF;
	if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) ||
	    (iocp == NULL))
	if ((mpt_verify_adapter(iocnumX, &iocp) < 0) || (iocp == NULL))
		return -ENODEV;

	if (!iocp->active) {
+1 −1
Original line number Diff line number Diff line
@@ -2006,7 +2006,7 @@ static int twa_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
	retval = pci_enable_device(pdev);
	if (retval) {
		TW_PRINTK(host, TW_DRIVER, 0x34, "Failed to enable pci device");
		goto out_disable_device;
		return -ENODEV;
	}

	pci_set_master(pdev);
+7 −7
Original line number Diff line number Diff line
@@ -912,7 +912,7 @@ static long tw_chrdev_ioctl(struct file *file, unsigned int cmd, unsigned long a
	data_buffer_length_adjusted = (data_buffer_length + 511) & ~511;

	/* Now allocate ioctl buf memory */
	cpu_addr = dma_alloc_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_New_Ioctl) - 1, &dma_handle, GFP_KERNEL);
	cpu_addr = dma_alloc_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted + sizeof(TW_New_Ioctl), &dma_handle, GFP_KERNEL);
	if (cpu_addr == NULL) {
		retval = -ENOMEM;
		goto out;
@@ -921,7 +921,7 @@ static long tw_chrdev_ioctl(struct file *file, unsigned int cmd, unsigned long a
	tw_ioctl = (TW_New_Ioctl *)cpu_addr;

	/* Now copy down the entire ioctl */
	if (copy_from_user(tw_ioctl, argp, data_buffer_length + sizeof(TW_New_Ioctl) - 1))
	if (copy_from_user(tw_ioctl, argp, data_buffer_length + sizeof(TW_New_Ioctl)))
		goto out2;

	passthru = (TW_Passthru *)&tw_ioctl->firmware_command;
@@ -966,15 +966,15 @@ static long tw_chrdev_ioctl(struct file *file, unsigned int cmd, unsigned long a
			/* Load the sg list */
			switch (TW_SGL_OUT(tw_ioctl->firmware_command.opcode__sgloffset)) {
			case 2:
				tw_ioctl->firmware_command.byte8.param.sgl[0].address = dma_handle + sizeof(TW_New_Ioctl) - 1;
				tw_ioctl->firmware_command.byte8.param.sgl[0].address = dma_handle + sizeof(TW_New_Ioctl);
				tw_ioctl->firmware_command.byte8.param.sgl[0].length = data_buffer_length_adjusted;
				break;
			case 3:
				tw_ioctl->firmware_command.byte8.io.sgl[0].address = dma_handle + sizeof(TW_New_Ioctl) - 1;
				tw_ioctl->firmware_command.byte8.io.sgl[0].address = dma_handle + sizeof(TW_New_Ioctl);
				tw_ioctl->firmware_command.byte8.io.sgl[0].length = data_buffer_length_adjusted;
				break;
			case 5:
				passthru->sg_list[0].address = dma_handle + sizeof(TW_New_Ioctl) - 1;
				passthru->sg_list[0].address = dma_handle + sizeof(TW_New_Ioctl);
				passthru->sg_list[0].length = data_buffer_length_adjusted;
				break;
			}
@@ -1017,12 +1017,12 @@ static long tw_chrdev_ioctl(struct file *file, unsigned int cmd, unsigned long a
	}

	/* Now copy the response to userspace */
	if (copy_to_user(argp, tw_ioctl, sizeof(TW_New_Ioctl) + data_buffer_length - 1))
	if (copy_to_user(argp, tw_ioctl, sizeof(TW_New_Ioctl) + data_buffer_length))
		goto out2;
	retval = 0;
out2:
	/* Now free ioctl buf memory */
	dma_free_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_New_Ioctl) - 1, cpu_addr, dma_handle);
	dma_free_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted + sizeof(TW_New_Ioctl), cpu_addr, dma_handle);
out:
	mutex_unlock(&tw_dev->ioctl_lock);
	mutex_unlock(&tw_mutex);
Loading