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

Commit 3ad435d4 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 quirk for delay before dme commands"

parents 1677dc8e cc23a3a8
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1893,6 +1893,10 @@ int ufshcd_dme_set_attr(struct ufs_hba *hba, u32 attr_sel,
	uic_cmd.argument2 = UIC_ARG_ATTR_TYPE(attr_set);
	uic_cmd.argument3 = mib_val;

	/* for stability purposes */
	if (hba->quirks & UFSHCD_QUIRK_DELAY_BEFORE_DME_CMDS)
		usleep_range(1000, 1100);

	ret = ufshcd_send_uic_cmd(hba, &uic_cmd);
	if (ret)
		dev_err(hba->dev, "%s: attr-id 0x%x val 0x%x error code %d\n",
@@ -1926,6 +1930,10 @@ int ufshcd_dme_get_attr(struct ufs_hba *hba, u32 attr_sel,
		UIC_CMD_DME_PEER_GET : UIC_CMD_DME_GET;
	uic_cmd.argument1 = attr_sel;

	/* for stability purposes */
	if (hba->quirks & UFSHCD_QUIRK_DELAY_BEFORE_DME_CMDS)
		usleep_range(1000, 1100);

	ret = ufshcd_send_uic_cmd(hba, &uic_cmd);
	if (ret) {
		dev_err(hba->dev, "%s: attr-id 0x%x error code %d\n",
+6 −0
Original line number Diff line number Diff line
@@ -396,6 +396,12 @@ struct ufs_hba {
	/* runtime pm or system suspend/resume is broken */
	#define UFSHCD_QUIRK_BROKEN_SUSPEND              (1 << 6)

	/*
	 * delay before each dme command is required as the unipro
	 * layer has shown instabilities
	 */
	#define UFSHCD_QUIRK_DELAY_BEFORE_DME_CMDS        (1 << 7)

	wait_queue_head_t tm_wq;
	wait_queue_head_t tm_tag_wq;
	unsigned long tm_condition;