summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-06-21 10:29:45 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-06-21 10:29:45 -0700
commit8cd8cf7a07e5d141b0c75ce6cf470630e11aa11a (patch)
tree47e9e5f4950dde81990d1c17920e427e29ecb9e3 /include
parent1bc18858358d7a4e263a63b59a12cbfd25c16670 (diff)
parent4f87e9068bf3aaf45f226261d5efd50bec42c12c (diff)
downloadlwn-8cd8cf7a07e5d141b0c75ce6cf470630e11aa11a.tar.gz
lwn-8cd8cf7a07e5d141b0c75ce6cf470630e11aa11a.zip
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley: "Only ufs driver updates this time, apart from which this is just an assortment of bug fixes and AI assisted changes. The biggest other change is the reversion of the sas_user_scan patch which supported a mpi3mr NVME behaviour but caused major issues for other sas controllers. The next biggest is the removal of target reset in tcm_loop.c" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (56 commits) scsi: target: Remove tcm_loop target reset handling scsi: lpfc: Fix spelling mistakes in comments scsi: ufs: ufs-pci: Add AMD device ID support scsi: ufs: core: Handle PM commands timeout before SCSI EH scsi: devinfo: Broaden Promise VTrak E310/E610 identification scsi: target: Use constant-time crypto_memneq() for CHAP digests scsi: target: Fix hexadecimal CHAP_I handling scsi: scsi_debug: Fix one-partition tape setup bounds scsi: ufs: qcom: dt-bindings: Document the Hawi UFS controller scsi: mailmap: Update Avri Altman's email address scsi: ufs: Remove redundant vops NULL check and trivial wrapper scsi: ufs: Remove unnecessary return in void vops wrappers scsi: ufs: Fix wrong value printed in unexpected UPIU response case scsi: ufs: core: Fix NULL pointer dereference in scsi_cmd_priv() calls scsi: megaraid_mbox: Avoid double kfree() scsi: pm8001: Fix error code in non_fatal_log_show() scsi: lpfc: Turn lpfc_queue q_pgs into a flexible array scsi: ufs: core: Skip link param validation when lanes_per_direction is unset scsi: sas: Skip opt_sectors when DMA reports no real optimization hint scsi: Revert "scsi: Fix sas_user_scan() to handle wildcard and multi-channel scans" ...
Diffstat (limited to 'include')
-rw-r--r--include/scsi/scsi_common.h8
-rw-r--r--include/scsi/scsi_device.h7
-rw-r--r--include/target/target_core_base.h5
-rw-r--r--include/ufs/ufs.h2
-rw-r--r--include/ufs/ufshcd.h12
5 files changed, 24 insertions, 10 deletions
diff --git a/include/scsi/scsi_common.h b/include/scsi/scsi_common.h
index fb58715fac86..00c8a16d3cd2 100644
--- a/include/scsi/scsi_common.h
+++ b/include/scsi/scsi_common.h
@@ -10,6 +10,14 @@
#include <uapi/linux/pr.h>
#include <scsi/scsi_proto.h>
+/* From the standard INQUIRY data description in SPC-6. */
+#define INQUIRY_VENDOR_OFFSET 8
+#define INQUIRY_VENDOR_LEN 8
+#define INQUIRY_MODEL_OFFSET 16
+#define INQUIRY_MODEL_LEN 16
+#define INQUIRY_REVISION_OFFSET 32
+#define INQUIRY_REVISION_LEN 4
+
enum scsi_pr_type {
SCSI_PR_WRITE_EXCLUSIVE = 0x01,
SCSI_PR_EXCLUSIVE_ACCESS = 0x03,
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 9c2a7bbe5891..029f5115b2ea 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -7,6 +7,7 @@
#include <linux/workqueue.h>
#include <linux/blk-mq.h>
#include <scsi/scsi.h>
+#include <scsi/scsi_common.h>
#include <linux/atomic.h>
#include <linux/sbitmap.h>
@@ -137,9 +138,9 @@ struct scsi_device {
struct mutex inquiry_mutex;
unsigned char inquiry_len; /* valid bytes in 'inquiry' */
unsigned char * inquiry; /* INQUIRY response data */
- const char * vendor; /* [back_compat] point into 'inquiry' ... */
- const char * model; /* ... after scan; point to static string */
- const char * rev; /* ... "nullnullnullnull" before scan */
+ char vendor[INQUIRY_VENDOR_LEN + 1];
+ char model[INQUIRY_MODEL_LEN + 1];
+ char rev[INQUIRY_REVISION_LEN + 1];
#define SCSI_DEFAULT_VPD_LEN 255 /* default SCSI VPD page size (max) */
struct scsi_vpd __rcu *vpd_pg0;
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 9a0e9f9e1ec4..002b0fc57587 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -8,6 +8,7 @@
#include <linux/percpu-refcount.h>
#include <linux/semaphore.h> /* struct semaphore */
#include <linux/completion.h>
+#include <scsi/scsi_common.h>
#define TARGET_CORE_VERSION "v5.0"
@@ -46,10 +47,6 @@
/* Used by transport_get_inquiry_vpd_device_ident() */
#define INQUIRY_VPD_DEVICE_IDENTIFIER_LEN 254
-#define INQUIRY_VENDOR_LEN 8
-#define INQUIRY_MODEL_LEN 16
-#define INQUIRY_REVISION_LEN 4
-
/* Attempts before moving from SHORT to LONG */
#define PYX_TRANSPORT_WINDOW_CLOSED_THRESHOLD 3
#define PYX_TRANSPORT_WINDOW_CLOSED_WAIT_SHORT 3 /* In milliseconds */
diff --git a/include/ufs/ufs.h b/include/ufs/ufs.h
index 602aa34c9822..0d48e137d66d 100644
--- a/include/ufs/ufs.h
+++ b/include/ufs/ufs.h
@@ -191,6 +191,8 @@ enum attr_idn {
QUERY_ATTR_IDN_WB_BUF_RESIZE_HINT = 0x3C,
QUERY_ATTR_IDN_WB_BUF_RESIZE_EN = 0x3D,
QUERY_ATTR_IDN_WB_BUF_RESIZE_STATUS = 0x3E,
+ QUERY_ATTR_IDN_TX_EQ_GN_SETTINGS = 0x47,
+ QUERY_ATTR_IDN_TX_EQ_GN_SETTINGS_EXT = 0x48,
};
/* Descriptor idn for Query requests */
diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h
index cfbc75d8df83..248d0a5bef40 100644
--- a/include/ufs/ufshcd.h
+++ b/include/ufs/ufshcd.h
@@ -358,6 +358,7 @@ struct ufshcd_tx_eqtr_record {
* @eqtr_record: Pointer to TX EQTR record
* @is_valid: True if parameter contains valid TX Equalization settings
* @is_applied: True if settings have been applied to UniPro of both sides
+ * @is_trained: True if parameters obtained from TX EQTR procedure
*/
struct ufshcd_tx_eq_params {
struct ufshcd_tx_eq_settings host[UFS_MAX_LANES];
@@ -365,6 +366,7 @@ struct ufshcd_tx_eq_params {
struct ufshcd_tx_eqtr_record *eqtr_record;
bool is_valid;
bool is_applied;
+ bool is_trained;
};
/**
@@ -804,6 +806,13 @@ enum ufshcd_quirks {
* delay after enabling VCC to ensure it's stable.
*/
UFSHCD_QUIRK_VCC_ON_DELAY = 1 << 27,
+
+ /*
+ * This quirk indicates that Host supports TX Equalization Training
+ * (EQTR) using Adapt L0L1L2L3 length which is larger than what is
+ * allowed by M-PHY spec ver 6.0.
+ */
+ UFSHCD_QUIRK_EXTENDED_TX_EQTR_ADAPT_LENGTH_L0L1L2L3 = 1 << 28,
};
enum ufshcd_caps {
@@ -1020,8 +1029,6 @@ enum ufshcd_mcq_opr {
* @caps: bitmask with information about UFS controller capabilities
* @devfreq: frequency scaling information owned by the devfreq core
* @clk_scaling: frequency scaling information owned by the UFS driver
- * @system_suspending: system suspend has been started and system resume has
- * not yet finished.
* @is_sys_suspended: UFS device has been suspended because of system suspend
* @urgent_bkops_lvl: keeps track of urgent bkops level for device
* @is_urgent_bkops_lvl_checked: keeps track if the urgent bkops level for
@@ -1197,7 +1204,6 @@ struct ufs_hba {
struct devfreq *devfreq;
struct ufs_clk_scaling clk_scaling;
- bool system_suspending;
bool is_sys_suspended;
enum bkops_status urgent_bkops_lvl;