Commit 944aacb6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents e0d4140e 309a29b5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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:
+1 −0
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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.
 */

+24 −0
Original line number Diff line number Diff line
@@ -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);

+1 −1
Original line number Diff line number Diff line
@@ -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
Loading