Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc34cc80 authored by Bao D. Nguyen's avatar Bao D. Nguyen
Browse files

scsi: ufs: Fix UFS's NOC error, command tracing



Fix UFS unclocked access error due to the function
ufshcd_release_all() being called erroneously.
As a result, the UFS clock gating code may turn off the
UFS clocks by mistake while the device is still active.
Also, fixed the UFS command tracing being disabled by mistake.

Change-Id: I5c8ff317d53d1e162b9275c81fe7e2e622cc69b5
Signed-off-by: default avatarBao D. Nguyen <nguyenb@codeaurora.org>
parent dd5080ee
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -753,9 +753,6 @@ static inline void ufshcd_cond_add_cmd_trace(struct ufs_hba *hba,
	sector_t lba = 0;
	int transfer_len = 0;

	if (!trace_ufshcd_command_enabled())
		return;

	lrbp = &hba->lrb[tag];

	if (lrbp->cmd) { /* data phase exists */
@@ -3703,7 +3700,6 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
	if (err) {
		err = SCSI_MLQUEUE_HOST_BUSY;
		clear_bit_unlock(tag, &hba->lrb_in_use);
		ufshcd_release_all(hba);
		goto out;
	}
	if (ufshcd_is_clkgating_allowed(hba))
+2 −2
Original line number Diff line number Diff line
@@ -892,10 +892,10 @@ struct ufs_hba {

	#define UFSHCD_BROKEN_LCC_PROCESSING_ON_HOST		UFS_BIT(13)

	#define UFSHCD_QUIRK_DME_PEER_GET_FAST_MODE		UFS_BIT(8)
	#define UFSHCD_QUIRK_DME_PEER_GET_FAST_MODE		UFS_BIT(14)

	/* Auto hibern8 support is broken */
	#define UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8		UFS_BIT(9)
	#define UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8		UFS_BIT(15)

	unsigned int quirks;	/* Deviations from standard UFSHCI spec. */