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

Commit e7156491 authored by Sujit Reddy Thumma's avatar Sujit Reddy Thumma
Browse files

scsi: ufs: Allow 64-bit broken quirk



Some UFS host controllers might advertise that 64-bit
addressing is not supported even though it supports >32-bit
addressing. Add a quirk so that 64-bit is enabled and dma mask
is set accordingly.

Change-Id: Ie17662f55dda1da7d508efb881ac8fb8fa95f15a
Signed-off-by: default avatarSujit Reddy Thumma <sthumma@codeaurora.org>
parent c8e1ea58
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -556,6 +556,9 @@ static inline void ufshcd_hba_capabilities(struct ufs_hba *hba)
	hba->nutrs = (hba->capabilities & MASK_TRANSFER_REQUESTS_SLOTS) + 1;
	hba->nutmrs =
	((hba->capabilities & MASK_TASK_MANAGEMENT_REQUEST_SLOTS) >> 16) + 1;

	if (hba->quirks & UFSHCD_QUIRK_BROKEN_CAP_64_BIT_0)
		hba->capabilities |= MASK_64_ADDRESSING_SUPPORT;
}

/**
+3 −0
Original line number Diff line number Diff line
@@ -299,6 +299,9 @@ struct ufs_hba {
	 */
	#define UFSHCD_QUIRK_BROKEN_VER_REG_1_1		(1<<2)

	/* UFSHC advertises 64-bit not supported even though it supports */
	#define UFSHCD_QUIRK_BROKEN_CAP_64_BIT_0        (1 << 3)

	struct uic_command *active_uic_cmd;
	struct mutex uic_cmd_mutex;