Re: [RFC/PATCH v2] usb: host: xhci: issue 'Reset Endpoint' for !CONTROL EPs from finish_td()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 14, 2014 at 10:39:15AM +0200, Mathias Nyman wrote:
> On 13.11.2014 20:46, Felipe Balbi wrote:
> > On Thu, Nov 13, 2014 at 12:31:28PM -0600, Felipe Balbi wrote:
> >> Hi,
> >>
> >> (your mailing is un-wrapping emails, I always end up with pretty long
> >> lines and have to rewrap them)
> >>
> >> On Thu, Nov 13, 2014 at 07:58:28PM +0200, Mathias Nyman wrote:
> >>>> The algorithm described in the DVB tuner bug is clearly wrong, since
> >>>> it doesn't move the dequeue pointer until usb_clear_halt() is
> >>>> called, which is far too late.  The right approach is to fix up the
> >>>> dequeue pointer before giving back the URB (so there's no need to
> >>>> save a "stopped TD" value).  Otherwise there will be TDs in the
> >>>> endpoint ring containing stale DMA pointers to buffers that have
> >>>> already been unmapped.
> >>>
> >>> Thats right, I cleaned up the patch and removed resetting the endpoint
> >>> from the .endpoint_reset() callback which was called as a result of
> >>> usb_clear_halt(). Now we queue a reset endpoint and set dequeue
> >>> pointer before giving back the URB.
> >>>
> >>> I still set a "stopped td" value, but could as well just pass it as
> >>> function parameter.  Actually I'll do that in later cleanup patch.
> >>>
> >>> Latest version of the patch is now in my tree in a reset-rework-v2
> >>> branch, with fixes comments and removed The brach includes the other
> >>> dorbell ringing patch as well.  both are on top of 3.18-rc4.
> >>>
> >>> I still need to test it before sending it further, the tree is here:
> >>>
> >>> git://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git  reset-rework-v2
> >>
> >> I'll test this one.
> > 
> > for both commits on that branch, you can add my:
> > 
> > Tested-by: Felipe Balbi <balbi@xxxxxx>
> > 
> > But please also add proper fixes and Cc: stable, so older kernels can
> > use those.
> > 
> 
> Thanks a lot for testing again.
> 
> I'll CC stable and add your tested-by, but I still don't know exactly
> which commit it Fixes. This might have been there since the early days
> of xhci.

git blame usually helps. Just look for code which was differentiating
COMP_STALL and treating it differently. I know that at least v3.14 has
the problem.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]