[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <0843ef58d4bfcd4caa5e99261aeb08de40db2779.camel@HansenPartnership.com>
Date: Wed, 14 Jan 2026 14:22:21 -0500
From: James Bottomley <James.Bottomley@...senPartnership.com>
To: Andrew Morton <akpm@...ux-foundation.org>, Linus Torvalds
<torvalds@...ux-foundation.org>
Cc: linux-scsi <linux-scsi@...r.kernel.org>, linux-kernel
<linux-kernel@...r.kernel.org>
Subject: [GIT PULL] SCSI fixes for 6.19-rc5
only one core change (and one in doc only) the rest are drivers. The
one core fix is for some inline encrypting drives that can't handle
encryption requests on non-data commands (like error handling ones); it
saves the request level encryption parameters in the eh_save structure
so they can be cleared for error handling and restored after it is
completed.
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
The short changelog is:
Bart Van Assche (1):
scsi: ufs: core: Configure MCQ after link startup
Brian Kao (1):
scsi: core: Fix error handler encryption support
Colin Ian King (1):
scsi: ufs: host: mediatek: Make read-only array scale_us static const
Julia Lawall (1):
scsi: bfa: Update outdated comment
Miao Li (1):
scsi: core: Correct documentation for scsi_test_unit_ready()
Ranjan Kumar (1):
scsi: mpt3sas: Update maintainer list
Zhaoming Luo (1):
scsi: ufs: dt-bindings: Fix several grammar errors
And the diffstat:
.../devicetree/bindings/ufs/ufs-common.yaml | 4 ++--
MAINTAINERS | 1 +
drivers/scsi/bfa/bfa_fcs.c | 2 +-
drivers/scsi/scsi_error.c | 24 ++++++++++++++++++++++
drivers/scsi/scsi_lib.c | 2 +-
drivers/ufs/core/ufshcd.c | 7 ++++---
drivers/ufs/host/ufs-mediatek.c | 2 +-
include/scsi/scsi_eh.h | 6 ++++++
8 files changed, 40 insertions(+), 8 deletions(-)
With full diff below.
Regards,
James
---
diff --git a/Documentation/devicetree/bindings/ufs/ufs-common.yaml b/Documentation/devicetree/bindings/ufs/ufs-common.yaml
index 9f04f34d8c5a..ed97f5682509 100644
--- a/Documentation/devicetree/bindings/ufs/ufs-common.yaml
+++ b/Documentation/devicetree/bindings/ufs/ufs-common.yaml
@@ -48,8 +48,8 @@ properties:
enum: [1, 2]
default: 2
description:
- Number of lanes available per direction. Note that it is assume same
- number of lanes is used both directions at once.
+ Number of lanes available per direction. Note that it is assumed that
+ the same number of lanes are used in both directions at once.
vdd-hba-supply:
description:
diff --git a/MAINTAINERS b/MAINTAINERS
index 5b11839cba9d..2e84051c8f9a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14873,6 +14873,7 @@ LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
M: Sathya Prakash <sathya.prakash@...adcom.com>
M: Sreekanth Reddy <sreekanth.reddy@...adcom.com>
M: Suganath Prabu Subramani <suganath-prabu.subramani@...adcom.com>
+M: Ranjan Kumar <ranjan.kumar@...adcom.com>
L: MPT-FusionLinux.pdl@...adcom.com
L: linux-scsi@...r.kernel.org
S: Supported
diff --git a/drivers/scsi/bfa/bfa_fcs.c b/drivers/scsi/bfa/bfa_fcs.c
index e52ce9b01f49..9b57312f43f5 100644
--- a/drivers/scsi/bfa/bfa_fcs.c
+++ b/drivers/scsi/bfa/bfa_fcs.c
@@ -1169,7 +1169,7 @@ bfa_fcs_fabric_vport_lookup(struct bfa_fcs_fabric_s *fabric, wwn_t pwwn)
* This function should be used only if there is any requirement
* to check for FOS version below 6.3.
* To check if the attached fabric is a brocade fabric, use
- * bfa_lps_is_brcd_fabric() which works for FOS versions 6.3
+ * fabric->lps->brcd_switch which works for FOS versions 6.3
* or above only.
*/
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index f869108fd969..eebca96c1fc1 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1063,6 +1063,9 @@ void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses,
unsigned char *cmnd, int cmnd_size, unsigned sense_bytes)
{
struct scsi_device *sdev = scmd->device;
+#ifdef CONFIG_BLK_INLINE_ENCRYPTION
+ struct request *rq = scsi_cmd_to_rq(scmd);
+#endif
/*
* We need saved copies of a number of fields - this is because
@@ -1114,6 +1117,18 @@ void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses,
scmd->cmnd[1] = (scmd->cmnd[1] & 0x1f) |
(sdev->lun << 5 & 0xe0);
+ /*
+ * Encryption must be disabled for the commands submitted by the error handler.
+ * Hence, clear the encryption context information.
+ */
+#ifdef CONFIG_BLK_INLINE_ENCRYPTION
+ ses->rq_crypt_keyslot = rq->crypt_keyslot;
+ ses->rq_crypt_ctx = rq->crypt_ctx;
+
+ rq->crypt_keyslot = NULL;
+ rq->crypt_ctx = NULL;
+#endif
+
/*
* Zero the sense buffer. The scsi spec mandates that any
* untransferred sense data should be interpreted as being zero.
@@ -1131,6 +1146,10 @@ EXPORT_SYMBOL(scsi_eh_prep_cmnd);
*/
void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd, struct scsi_eh_save *ses)
{
+#ifdef CONFIG_BLK_INLINE_ENCRYPTION
+ struct request *rq = scsi_cmd_to_rq(scmd);
+#endif
+
/*
* Restore original data
*/
@@ -1143,6 +1162,11 @@ void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd, struct scsi_eh_save *ses)
scmd->underflow = ses->underflow;
scmd->prot_op = ses->prot_op;
scmd->eh_eflags = ses->eh_eflags;
+
+#ifdef CONFIG_BLK_INLINE_ENCRYPTION
+ rq->crypt_keyslot = ses->rq_crypt_keyslot;
+ rq->crypt_ctx = ses->rq_crypt_ctx;
+#endif
}
EXPORT_SYMBOL(scsi_eh_restore_cmnd);
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 93031326ac3e..c7d6b76c86d2 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -2459,7 +2459,7 @@ EXPORT_SYMBOL(scsi_mode_sense);
* @retries: number of retries before failing
* @sshdr: outpout pointer for decoded sense information.
*
- * Returns zero if unsuccessful or an error if TUR failed. For
+ * Returns zero if successful or an error if TUR failed. For
* removable media, UNIT_ATTENTION sets ->changed flag.
**/
int
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 0babb7035200..604043a7533d 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -10736,9 +10736,7 @@ static int ufshcd_add_scsi_host(struct ufs_hba *hba)
if (is_mcq_supported(hba)) {
ufshcd_mcq_enable(hba);
err = ufshcd_alloc_mcq(hba);
- if (!err) {
- ufshcd_config_mcq(hba);
- } else {
+ if (err) {
/* Continue with SDB mode */
ufshcd_mcq_disable(hba);
use_mcq_mode = false;
@@ -11011,6 +11009,9 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
if (err)
goto out_disable;
+ if (hba->mcq_enabled)
+ ufshcd_config_mcq(hba);
+
if (hba->quirks & UFSHCD_QUIRK_SKIP_PH_CONFIGURATION)
goto initialized;
diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index ecbbf52bf734..66b11cc0703b 100644
--- a/drivers/ufs/host/ufs-mediatek.c
+++ b/drivers/ufs/host/ufs-mediatek.c
@@ -1112,7 +1112,7 @@ static void ufs_mtk_setup_clk_gating(struct ufs_hba *hba)
unsigned long flags;
u32 ah_ms = 10;
u32 ah_scale, ah_timer;
- u32 scale_us[] = {1, 10, 100, 1000, 10000, 100000};
+ static const u32 scale_us[] = {1, 10, 100, 1000, 10000, 100000};
if (ufshcd_is_clkgating_allowed(hba)) {
if (ufshcd_is_auto_hibern8_supported(hba) && hba->ahit) {
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h
index 1ae08e81339f..15679be90c5c 100644
--- a/include/scsi/scsi_eh.h
+++ b/include/scsi/scsi_eh.h
@@ -41,6 +41,12 @@ struct scsi_eh_save {
unsigned char cmnd[32];
struct scsi_data_buffer sdb;
struct scatterlist sense_sgl;
+
+ /* struct request fields */
+#ifdef CONFIG_BLK_INLINE_ENCRYPTION
+ struct bio_crypt_ctx *rq_crypt_ctx;
+ struct blk_crypto_keyslot *rq_crypt_keyslot;
+#endif
};
extern void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd,
Powered by blists - more mailing lists