lkml.org 
[lkml]   [2020]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v3] scsi: ufs: Cleanup completed request without interrupt notification
Date
> > > > > +cleanup:
> > > > > + spin_lock_irqsave(host->host_lock, flags);
> > > > > + if (!test_bit(tag, &hba->outstanding_reqs)) {
> > Is this needed? it was already checked in line 6439.
> >
>
> I am worried about the case that interrupt comes very lately.
scsi timeout is 30sec - do you expect an interrupt to arrive after that?

Thanks,
Avri

>For
> example, if interrupt finally comes while ufshcd_abort() is handling
> this command, then probably this command may be completed first by
> interrupt handler. In this case, ufshcd_abort() shall not clear this
> command again. In contrast, if ufshcd_abort() clears this command first,
> then interrupt shall not complete it. Thus here checking
> hba->outstanding_req with host lock held is required to prevent above
> racing.
>
> Thanks,
> Stanley Chu
>

\
 
 \ /
  Last update: 2020-07-14 11:31    [W:0.057 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site