Skip to content

Commit f66bc38

Browse files
committed
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
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() ...
2 parents 3536049 + fd2963e commit f66bc38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1990
-1823
lines changed

Documentation/ABI/testing/sysfs-driver-ufs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,3 +1636,52 @@ Description:
16361636
attribute value.
16371637

16381638
The attribute is read only.
1639+
1640+
What: /sys/bus/platform/drivers/ufshcd/*/wb_resize_enable
1641+
What: /sys/bus/platform/devices/*.ufs/wb_resize_enable
1642+
Date: April 2025
1643+
Contact: Huan Tang <tanghuan@vivo.com>
1644+
Description:
1645+
The host can enable the WriteBooster buffer resize by setting this
1646+
attribute.
1647+
1648+
======== ======================================
1649+
idle There is no resize operation
1650+
decrease Decrease WriteBooster buffer size
1651+
increase Increase WriteBooster buffer size
1652+
======== ======================================
1653+
1654+
The file is write only.
1655+
1656+
What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_resize_hint
1657+
What: /sys/bus/platform/devices/*.ufs/attributes/wb_resize_hint
1658+
Date: April 2025
1659+
Contact: Huan Tang <tanghuan@vivo.com>
1660+
Description:
1661+
wb_resize_hint indicates hint information about which type of resize
1662+
for WriteBooster buffer is recommended by the device.
1663+
1664+
========= ======================================
1665+
keep Recommend keep the buffer size
1666+
decrease Recommend to decrease the buffer size
1667+
increase Recommend to increase the buffer size
1668+
========= ======================================
1669+
1670+
The file is read only.
1671+
1672+
What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_resize_status
1673+
What: /sys/bus/platform/devices/*.ufs/attributes/wb_resize_status
1674+
Date: April 2025
1675+
Contact: Huan Tang <tanghuan@vivo.com>
1676+
Description:
1677+
The host can check the resize operation status of the WriteBooster
1678+
buffer by reading this attribute.
1679+
1680+
================ ========================================
1681+
idle Resize operation is not issued
1682+
in_progress Resize operation in progress
1683+
complete_success Resize operation completed successfully
1684+
general_failure Resize operation general failure
1685+
================ ========================================
1686+
1687+
The file is read only.

Documentation/devicetree/bindings/ufs/qcom,ufs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ properties:
4343
- qcom,sm8450-ufshc
4444
- qcom,sm8550-ufshc
4545
- qcom,sm8650-ufshc
46+
- qcom,sm8750-ufshc
4647
- const: qcom,ufshc
4748
- const: jedec,ufs-2.0
4849

@@ -158,6 +159,7 @@ allOf:
158159
- qcom,sm8450-ufshc
159160
- qcom,sm8550-ufshc
160161
- qcom,sm8650-ufshc
162+
- qcom,sm8750-ufshc
161163
then:
162164
properties:
163165
clocks:

Documentation/scsi/scsi_mid_low_api.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ISA adapters).]
3737
The SCSI mid level isolates an LLD from other layers such as the SCSI
3838
upper layer drivers and the block layer.
3939

40-
This version of the document roughly matches linux kernel version 2.6.8 .
40+
This version of the document roughly matches Linux kernel version 2.6.8 .
4141

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

@@ -75,7 +75,7 @@ It is probably best to study how existing LLDs are organized.
7575
As the 2.5 series development kernels evolve into the 2.6 series
7676
production series, changes are being introduced into this interface. An
7777
example of this is driver initialization code where there are now 2 models
78-
available. The older one, similar to what was found in the lk 2.4 series,
78+
available. The older one, similar to what was found in the Linux 2.4 series,
7979
is based on hosts that are detected at HBA driver load time. This will be
8080
referred to the "passive" initialization model. The newer model allows HBAs
8181
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
10261026
of interest:
10271027

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

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

11821182

1183-
Changes since lk 2.4 series
1184-
===========================
1183+
Changes since Linux kernel 2.4 series
1184+
=====================================
11851185
io_request_lock has been replaced by several finer grained locks. The lock
11861186
relevant to LLDs is struct Scsi_Host::host_lock and there is
11871187
one per SCSI host.

drivers/mmc/host/sdhci-msm.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,6 +1882,11 @@ static int sdhci_msm_ice_init(struct sdhci_msm_host *msm_host,
18821882
if (IS_ERR_OR_NULL(ice))
18831883
return PTR_ERR_OR_ZERO(ice);
18841884

1885+
if (qcom_ice_get_supported_key_type(ice) != BLK_CRYPTO_KEY_TYPE_RAW) {
1886+
dev_warn(dev, "Wrapped keys not supported. Disabling inline encryption support.\n");
1887+
return 0;
1888+
}
1889+
18851890
msm_host->ice = ice;
18861891

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

1965-
/* Only AES-256-XTS has been tested so far. */
1966-
if (key->crypto_cfg.crypto_mode != BLK_ENCRYPTION_MODE_AES_256_XTS)
1967-
return -EOPNOTSUPP;
1968-
1969-
return qcom_ice_program_key(msm_host->ice,
1970-
QCOM_ICE_CRYPTO_ALG_AES_XTS,
1971-
QCOM_ICE_CRYPTO_KEY_SIZE_256,
1972-
key->bytes,
1973-
key->crypto_cfg.data_unit_size / 512,
1974-
slot);
1970+
return qcom_ice_program_key(msm_host->ice, slot, key);
19751971
}
19761972

19771973
static int sdhci_msm_ice_keyslot_evict(struct blk_crypto_profile *profile,

drivers/s390/scsi/zfcp_aux.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -312,15 +312,13 @@ static void zfcp_print_sl(struct seq_file *m, struct service_level *sl)
312312

313313
static int zfcp_setup_adapter_work_queue(struct zfcp_adapter *adapter)
314314
{
315-
char name[TASK_COMM_LEN];
316-
317-
snprintf(name, sizeof(name), "zfcp_q_%s",
318-
dev_name(&adapter->ccw_device->dev));
319-
adapter->work_queue = alloc_ordered_workqueue(name, WQ_MEM_RECLAIM);
315+
adapter->work_queue =
316+
alloc_ordered_workqueue("zfcp_q_%s", WQ_MEM_RECLAIM,
317+
dev_name(&adapter->ccw_device->dev));
318+
if (!adapter->work_queue)
319+
return -ENOMEM;
320320

321-
if (adapter->work_queue)
322-
return 0;
323-
return -ENOMEM;
321+
return 0;
324322
}
325323

326324
static void zfcp_destroy_adapter_work_queue(struct zfcp_adapter *adapter)

0 commit comments

Comments
 (0)