mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 02:31:27 +02:00
SCSI fixes on 20260114
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. Signed-off-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> -----BEGIN PGP SIGNATURE----- iLgEABMIAGAWIQTnYEDbdso9F2cI+arnQslM7pishQUCaWenYBsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMSwyLDImHGphbWVzLmJvdHRvbWxleUBoYW5zZW5wYXJ0bmVy c2hpcC5jb20ACgkQ50LJTO6YrIVx5AD+Kk4wp3SbZ15h/73P16RyewQTCajolr3P qSdgfU4NwdUA/i9v25plFSekqLZS7RhUJ9QvA+9LTqxZjXz3NwvZADIe =0QBm -----END PGP SIGNATURE----- Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "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" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: host: mediatek: Make read-only array scale_us static const scsi: bfa: Update outdated comment scsi: mpt3sas: Update maintainer list scsi: ufs: core: Configure MCQ after link startup scsi: core: Fix error handler encryption support scsi: core: Correct documentation for scsi_test_unit_ready() scsi: ufs: dt-bindings: Fix several grammar errors
This commit is contained in:
commit
944aacb68b
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -14880,6 +14880,7 @@ LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
|
|||
M: Sathya Prakash <sathya.prakash@broadcom.com>
|
||||
M: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
|
||||
M: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
|
||||
M: Ranjan Kumar <ranjan.kumar@broadcom.com>
|
||||
L: MPT-FusionLinux.pdl@broadcom.com
|
||||
L: linux-scsi@vger.kernel.org
|
||||
S: Supported
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user