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

Commit 8e50707a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufs: optimize the sending of REQUEST_SENSE to device W-LU"

parents 203a92e7 d284599f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -4498,6 +4498,7 @@ static int ufshcd_probe_hba(struct ufs_hba *hba)
	ufshcd_set_ufs_dev_active(hba);
	ufshcd_force_reset_auto_bkops(hba);
	hba->ufshcd_state = UFSHCD_STATE_OPERATIONAL;
	hba->wlun_dev_clr_ua = true;

	if (ufshcd_config_max_pwr_mode(hba))
		dev_err(hba->dev,
@@ -5207,10 +5208,12 @@ static int ufshcd_set_dev_pwr_mode(struct ufs_hba *hba,
	 * handling context.
	 */
	hba->host->eh_noresume = 1;
	if (pwr_mode != UFS_ACTIVE_PWR_MODE) {
	if (hba->wlun_dev_clr_ua) {
		ret = ufshcd_send_request_sense(hba, sdp);
		if (ret)
			goto out;
		/* Unit attention condition is cleared now */
		hba->wlun_dev_clr_ua = false;
	}

	cmd[4] = pwr_mode << 4;
+6 −0
Original line number Diff line number Diff line
@@ -552,6 +552,12 @@ struct ufs_hba {
	struct debugfs_files debugfs_files;
#endif
	bool is_sys_suspended;
	/*
	 * Set this flag to indicate that UNIT ATTENTION condition should be
	 * explicitly cleared for Device WLUN before issuing commands like
	 * START STOP UNIT.
	 */
	bool wlun_dev_clr_ua;
};

/* Returns true if clocks can be gated. Otherwise false */