[PATCH v10 2/2] ufs: core: requeue aborted request
Peter Wang (王信友)
peter.wang at mediatek.com
Thu Oct 10 22:44:08 PDT 2024
On Wed, 2024-10-09 at 11:06 -0700, Bart Van Assche wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
> On 10/8/24 7:17 PM, Peter Wang (王信友) wrote:
> > Yes, this patch is only for MCQ mode, because only MCQ mode
> > receives OCS: ABORTED, right? This patch doesn't modify
> > any of the Legacy mode flows, does it?
>
> Agreed. What I mentioned in my email is an existing bug in the legacy
> flow for ufshcd_abort_all().
>
> > Furthermore, even if there is an issue with Legacy mode, it
> > should be addressed by a separate patch, not by this one, which is
> > intended to resolve the MCQ mode issue. We shouldn't mix two
> > different issues together, don't you agree?
>
> Let's proceed with this patch series and let's address what I brought
> up in my email separately.
>
> With the current approach for error handling in the UFS driver,
> anyone
> who wants to verify or modify ufshcd_try_to_abort_task() has to
> consider
> all possible interleavings of ufshcd_try_to_abort_task() and the
> completion path (ufshcd_compl_one_cqe()). That's an unnecessary
> burden
> on UFS driver contributors. Additionally, this is error-prone. This
> applies to both modes (legacy and MCQ). I know of reports of sporadic
> crashes in legacy mode related to UFS error handling. I'm wondering
> whether these are perhaps the result of the issue I mentioned in a
> previous email. Anyway, I will look further into this myself as soon
> as
> I have the time.
>
> Thanks,
>
> Bart.
Hi Bart,
Thank you for your review.
I currently cannot see the issue of duplicate releases in
legacy SDB mode. ufshcd_try_to_abort_task() will directly
reset if it fails. It is only in the case of success that
we need to consider the possibility of ufshcd_compl_one_cqe.
I believe the original design flow has already taken this
into account, which is why there is protection with
outstanding_lock/cq_lock. Perhaps we can wait for an actual
example to occur before making corrections. Even if there
is an issue, I think the probability should be very low,
because the flow for legacy SDB mode has been in use
for several years.
Thank you again for your review.
Thanks
Peter
More information about the Linux-mediatek
mailing list