Commit f66bc387 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI updates from James Bottomley:
 "Updates to the usual drivers (smartpqi, ufs, lpfc, scsi_debug, target,
  hisi_sas) with the only substantive core change being the removal of
  the stream_status member from the scsi_stream_status_header (to get
  rid of flex array members)"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (77 commits)
  scsi: target: core: Constify struct target_opcode_descriptor
  scsi: target: core: Constify enabled() in struct target_opcode_descriptor
  scsi: hisi_sas: Fix warning detected by sparse
  scsi: mpt3sas: Fix _ctl_get_mpt_mctp_passthru_adapter() to return IOC pointer
  scsi: sg: Remove unnecessary NULL check before unregister_sysctl_table()
  scsi: ufs: mcq: Delete ufshcd_release_scsi_cmd() in ufshcd_mcq_abort()
  scsi: ufs: qcom: dt-bindings: Document the SM8750 UFS Controller
  scsi: mvsas: Fix typos in SAS/SATA VSP register comments
  scsi: fnic: Replace memset() with eth_zero_addr()
  scsi: ufs: core: Support updating device command timeout
  scsi: ufs: core: Change hwq_id type and value
  scsi: ufs: core: Increase the UIC command timeout further
  scsi: zfcp: Simplify workqueue allocation
  scsi: ufs: core: Print error value as hex format in ufshcd_err_handler()
  scsi: sd: Remove the stream_status member from scsi_stream_status_header
  scsi: docs: Clean up some style in scsi_mid_low_api
  scsi: core: Remove unused scsi_dev_info_list_del_keyed()
  scsi: isci: Remove unused sci_remote_device_reset()
  scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH
  scsi: smartpqi: Delete a stray tab in pqi_is_parity_write_stream()
  ...
parents 35360498 fd2963e7
Loading
Loading
Loading
Loading
+49 −0
Original line number Diff line number Diff line
@@ -1636,3 +1636,52 @@ Description:
		attribute value.

		The attribute is read only.

What:		/sys/bus/platform/drivers/ufshcd/*/wb_resize_enable
What:		/sys/bus/platform/devices/*.ufs/wb_resize_enable
Date:		April 2025
Contact:	Huan Tang <tanghuan@vivo.com>
Description:
		The host can enable the WriteBooster buffer resize by setting this
		attribute.

		========  ======================================
		idle      There is no resize operation
		decrease  Decrease WriteBooster buffer size
		increase  Increase WriteBooster buffer size
		========  ======================================

		The file is write only.

What:		/sys/bus/platform/drivers/ufshcd/*/attributes/wb_resize_hint
What:		/sys/bus/platform/devices/*.ufs/attributes/wb_resize_hint
Date:		April 2025
Contact:	Huan Tang <tanghuan@vivo.com>
Description:
		wb_resize_hint indicates hint information about which type of resize
		for WriteBooster buffer is recommended by the device.

		=========  ======================================
		keep       Recommend keep the buffer size
		decrease   Recommend to decrease the buffer size
		increase   Recommend to increase the buffer size
		=========  ======================================

		The file is read only.

What:		/sys/bus/platform/drivers/ufshcd/*/attributes/wb_resize_status
What:		/sys/bus/platform/devices/*.ufs/attributes/wb_resize_status
Date:		April 2025
Contact:	Huan Tang <tanghuan@vivo.com>
Description:
		The host can check the resize operation status of the WriteBooster
		buffer by reading this attribute.

		================  ========================================
		idle              Resize operation is not issued
		in_progress       Resize operation in progress
		complete_success  Resize operation completed successfully
		general_failure   Resize operation general failure
		================  ========================================

		The file is read only.
+2 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ properties:
          - qcom,sm8450-ufshc
          - qcom,sm8550-ufshc
          - qcom,sm8650-ufshc
          - qcom,sm8750-ufshc
      - const: qcom,ufshc
      - const: jedec,ufs-2.0

@@ -158,6 +159,7 @@ allOf:
              - qcom,sm8450-ufshc
              - qcom,sm8550-ufshc
              - qcom,sm8650-ufshc
              - qcom,sm8750-ufshc
    then:
      properties:
        clocks:
+9 −9
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ ISA adapters).]
The SCSI mid level isolates an LLD from other layers such as the SCSI
upper layer drivers and the block layer.

This version of the document roughly matches linux kernel version 2.6.8 .
This version of the document roughly matches Linux kernel version 2.6.8 .

Documentation
=============
@@ -48,7 +48,7 @@ found in that directory. A more recent copy of this document may be found
at https://docs.kernel.org/scsi/scsi_mid_low_api.html. Many LLDs are
documented in Documentation/scsi (e.g. aic7xxx.rst). The SCSI mid-level is
briefly described in scsi.rst which contains a URL to a document describing
the SCSI subsystem in the Linux Kernel 2.4 series. Two upper level
the SCSI subsystem in the Linux kernel 2.4 series. Two upper level
drivers have documents in that directory: st.rst (SCSI tape driver) and
scsi-generic.rst (for the sg driver).

@@ -75,7 +75,7 @@ It is probably best to study how existing LLDs are organized.
As the 2.5 series development kernels evolve into the 2.6 series
production series, changes are being introduced into this interface. An
example of this is driver initialization code where there are now 2 models
available. The older one, similar to what was found in the lk 2.4 series,
available. The older one, similar to what was found in the Linux 2.4 series,
is based on hosts that are detected at HBA driver load time. This will be
referred to the "passive" initialization model. The newer model allows HBAs
to be hot plugged (and unplugged) during the lifetime of the LLD and will
@@ -1026,7 +1026,7 @@ initialized from the driver's struct scsi_host_template instance. Members
of interest:

    host_no
		 - system wide unique number that is used for identifying
		 - system-wide unique number that is used for identifying
                   this host. Issued in ascending order from 0.
    can_queue
		 - must be greater than 0; do not send more than can_queue
@@ -1053,7 +1053,7 @@ of interest:
		 - pointer to driver's struct scsi_host_template from which
                   this struct Scsi_Host instance was spawned
    hostt->proc_name
		 - name of LLD. This is the driver name that sysfs uses
		 - name of LLD. This is the driver name that sysfs uses.
    transportt
		 - pointer to driver's struct scsi_transport_template instance
                   (if any). FC and SPI transports currently supported.
@@ -1067,7 +1067,7 @@ The scsi_host structure is defined in include/scsi/scsi_host.h
struct scsi_device
------------------
Generally, there is one instance of this structure for each SCSI logical unit
on a host. Scsi devices connected to a host are uniquely identified by a
on a host. SCSI devices connected to a host are uniquely identified by a
channel number, target id and logical unit number (lun).
The structure is defined in include/scsi/scsi_device.h

@@ -1091,7 +1091,7 @@ Members of interest:
		 - should be set by LLD prior to calling 'done'. A value
                   of 0 implies a successfully completed command (and all
                   data (if any) has been transferred to or from the SCSI
                   target device). 'result' is a 32 bit unsigned integer that
                   target device). 'result' is a 32-bit unsigned integer that
                   can be viewed as 2 related bytes. The SCSI status value is
                   in the LSB. See include/scsi/scsi.h status_byte() and
                   host_byte() macros and related constants.
@@ -1180,8 +1180,8 @@ may get out of synchronization. This is why it is best for the LLD
to perform autosense.


Changes since lk 2.4 series
===========================
Changes since Linux kernel 2.4 series
=====================================
io_request_lock has been replaced by several finer grained locks. The lock
relevant to LLDs is struct Scsi_Host::host_lock and there is
one per SCSI host.
+6 −10
Original line number Diff line number Diff line
@@ -1882,6 +1882,11 @@ static int sdhci_msm_ice_init(struct sdhci_msm_host *msm_host,
	if (IS_ERR_OR_NULL(ice))
		return PTR_ERR_OR_ZERO(ice);

	if (qcom_ice_get_supported_key_type(ice) != BLK_CRYPTO_KEY_TYPE_RAW) {
		dev_warn(dev, "Wrapped keys not supported. Disabling inline encryption support.\n");
		return 0;
	}

	msm_host->ice = ice;

	/* Initialize the blk_crypto_profile */
@@ -1962,16 +1967,7 @@ static int sdhci_msm_ice_keyslot_program(struct blk_crypto_profile *profile,
	struct sdhci_msm_host *msm_host =
		sdhci_msm_host_from_crypto_profile(profile);

	/* Only AES-256-XTS has been tested so far. */
	if (key->crypto_cfg.crypto_mode != BLK_ENCRYPTION_MODE_AES_256_XTS)
		return -EOPNOTSUPP;

	return qcom_ice_program_key(msm_host->ice,
				    QCOM_ICE_CRYPTO_ALG_AES_XTS,
				    QCOM_ICE_CRYPTO_KEY_SIZE_256,
				    key->bytes,
				    key->crypto_cfg.data_unit_size / 512,
				    slot);
	return qcom_ice_program_key(msm_host->ice, slot, key);
}

static int sdhci_msm_ice_keyslot_evict(struct blk_crypto_profile *profile,
+6 −8
Original line number Diff line number Diff line
@@ -312,15 +312,13 @@ static void zfcp_print_sl(struct seq_file *m, struct service_level *sl)

static int zfcp_setup_adapter_work_queue(struct zfcp_adapter *adapter)
{
	char name[TASK_COMM_LEN];

	snprintf(name, sizeof(name), "zfcp_q_%s",
	adapter->work_queue =
		alloc_ordered_workqueue("zfcp_q_%s", WQ_MEM_RECLAIM,
					dev_name(&adapter->ccw_device->dev));
	adapter->work_queue = alloc_ordered_workqueue(name, WQ_MEM_RECLAIM);
	if (!adapter->work_queue)
		return -ENOMEM;

	if (adapter->work_queue)
	return 0;
	return -ENOMEM;
}

static void zfcp_destroy_adapter_work_queue(struct zfcp_adapter *adapter)
Loading