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

Commit 357d5df9 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: add a quirk to fix gear change to HS"

parents 8bd6cb9b 153b5488
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -2464,12 +2464,24 @@ out:
static int ufshcd_uic_change_pwr_mode(struct ufs_hba *hba, u8 mode)
{
	struct uic_command uic_cmd = {0};
	int ret;

	if (hba->quirks & UFSHCD_BROKEN_GEAR_CHANGE_INTO_HS) {
		ret = ufshcd_dme_set(hba,
				UIC_ARG_MIB_SEL(PA_RXHSUNTERMCAP, 0), 1);
		if (ret) {
			dev_err(hba->dev, "%s: failed to enable PA_RXHSUNTERMCAP ret %d\n",
						__func__, ret);
			goto out;
		}
	}

	uic_cmd.command = UIC_CMD_DME_SET;
	uic_cmd.argument1 = UIC_ARG_MIB(PA_PWRMODE);
	uic_cmd.argument3 = mode;

	return ufshcd_uic_pwr_ctrl(hba, &uic_cmd);
	ret = ufshcd_uic_pwr_ctrl(hba, &uic_cmd);
out:
	return ret;
}

static int ufshcd_uic_hibern8_enter(struct ufs_hba *hba)
+7 −0
Original line number Diff line number Diff line
@@ -488,6 +488,13 @@ struct ufs_hba {
	 */
	#define UFSHCD_BROKEN_LCC			  (1 << 9)

	/*
	 * The attribute PA_RXHSUNTERMCAP specifies whether or not the
	 * inbound Link supports unterminated line in HS mode. Setting this
	 * attribute to 1 fixes moving to HS gear.
	 */
	#define UFSHCD_BROKEN_GEAR_CHANGE_INTO_HS        (1 << 10)

	wait_queue_head_t tm_wq;
	wait_queue_head_t tm_tag_wq;
	unsigned long tm_condition;