[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1b418968-2a53-443e-8766-9d280447bb2d@quicinc.com>
Date: Tue, 29 Jul 2025 20:07:33 +0530
From: Nitin Rawat <quic_nitirawa@...cinc.com>
To: Bart Van Assche <bvanassche@....org>, <alim.akhtar@...sung.com>,
<avri.altman@....com>, <James.Bottomley@...senPartnership.com>,
<huobean@...il.com>, <mani@...nel.org>, <martin.petersen@...cle.com>,
<beanhuo@...ron.com>, <peter.wang@...iatek.com>,
<andre.draszik@...aro.org>
CC: <linux-arm-msm@...r.kernel.org>, <linux-scsi@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
Palash Kambar <quic_pkambar@...cinc.com>
Subject: Re: [PATCH V1] ufs: core: Fix interrupt handling for MCQ Mode in
ufshcd_intr
On 7/29/2025 5:11 AM, Bart Van Assche wrote:
> On 7/28/25 3:57 PM, Nitin Rawat wrote:
>> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
>> index fd8015ed36a4..5413464d63c8 100644
>> --- a/drivers/ufs/core/ufshcd.c
>> +++ b/drivers/ufs/core/ufshcd.c
>> @@ -7145,14 +7145,19 @@ static irqreturn_t ufshcd_threaded_intr(int
>> irq, void *__hba)
>> static irqreturn_t ufshcd_intr(int irq, void *__hba)
>> {
>> struct ufs_hba *hba = __hba;
>> + u32 intr_status, enabled_intr_status;
>>
>> /* Move interrupt handling to thread when MCQ & ESI are not
>> enabled */
>> if (!hba->mcq_enabled || !hba->mcq_esi_enabled)
>> return IRQ_WAKE_THREAD;
>>
>> + intr_status = ufshcd_readl(hba, REG_INTERRUPT_STATUS);
>> + enabled_intr_status = intr_status & ufshcd_readl(hba,
>> REG_INTERRUPT_ENABLE);
>> +
>> + ufshcd_writel(hba, intr_status, REG_INTERRUPT_STATUS);
>> +
>> /* Directly handle interrupts since MCQ ESI handlers does the
>> hard job */
>> - return ufshcd_sl_intr(hba, ufshcd_readl(hba, REG_INTERRUPT_STATUS) &
>> - ufshcd_readl(hba, REG_INTERRUPT_ENABLE));
>> + return ufshcd_sl_intr(hba, enabled_intr_status);
>> }
>
> Hi Nitin,
>
> Thank you for having published this patch. It seems like we both have
> been working on a fix independently and without knowing about each
> other's efforts. Can you please take a look at this patch and let me
> know which version you prefer?
Hi Bart,
I reviewed your patch and test it locally—it resolves the issue.
The patch looks good. Since this path handles only UIC, TM, and error
conditions with no IO for MCQ, we still check for outstanding_reqs and
UTP_TRANSFER_REQ_COMPL for the error case within ufshcd_threaded_intr in
the patch. In my opinion, we can skip these additional checks.
Thanks,
Nitin
>
> https://lore.kernel.org/linux-scsi/20250728212731.899429-1-
> bvanassche@....org/
>
> Thanks,
>
> Bart.
Powered by blists - more mailing lists