[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f79a87ba-4d2d-42f0-ab94-1e6821a482f2@acm.org>
Date: Thu, 15 Aug 2024 11:25:38 -0700
From: Bart Van Assche <bvanassche@....org>
To: manivannan.sadhasivam@...aro.org, Alim Akhtar <alim.akhtar@...sung.com>,
Avri Altman <avri.altman@....com>,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, Kyoungrul Kim <k831.kim@...sung.com>,
Amit Pundir <amit.pundir@...aro.org>
Subject: Re: [PATCH v2 2/3] ufs: core: Add a quirk for handling broken LSDBS
field in controller capabilities register
On 8/14/24 10:16 PM, Manivannan Sadhasivam via B4 Relay wrote:
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 0b1787074215..8c9ff8696bcd 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -2426,7 +2426,11 @@ static inline int ufshcd_hba_capabilities(struct ufs_hba *hba)
> * 0h: legacy single doorbell support is available
> * 1h: indicate that legacy single doorbell support has been removed
> */
> - hba->lsdbs_sup = !FIELD_GET(MASK_LSDBS_SUPPORT, hba->capabilities);
> + if (!(hba->quirks & UFSHCD_QUIRK_BROKEN_LSDBS_CAP))
> + hba->lsdbs_sup = !FIELD_GET(MASK_LSDBS_SUPPORT, hba->capabilities);
> + else
> + hba->lsdbs_sup = true;
> +
> if (!hba->mcq_sup)
> return 0;
An additional question: since the next patch only sets
UFSHCD_QUIRK_BROKEN_LSDBS_CAP for a board with a UFSHCI 3.0 controller,
do we really need the new quirk or can we replace the "!(hba->quirks &
UFSHCD_QUIRK_BROKEN_LSDBS_CAP)" test with a test that verifies that the
UFSHCI controller implements version 4.0 or later of the specification?
Thanks,
Bart.
Powered by blists - more mailing lists