lkml.org 
[lkml]   [2020]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] xhci: Always restore EP_SOFT_CLEAR_TOGGLE even if ep reset failed
On Fri, Aug 21, 2020 at 03:06:52PM +0800, Ding Hui wrote:
> Some devices driver call libusb_clear_halt when target ep queue
> is not empty. (eg. spice client connected to qemu for usb redir)
>
> Before commit f5249461b504 ("xhci: Clear the host side toggle
> manually when endpoint is soft reset"), that works well.
> But now, we got the error log:
>
> EP not empty, refuse reset
>
> xhch_endpoint_reset failed and left ep_state's EP_SOFT_CLEAR_TOGGLE
> bit is still on
>
> So all the subsequent urb sumbit to the ep will fail with the
> warn log:
>
> Can't enqueue URB while manually clearing toggle
>
> We need restore ep_state EP_SOFT_CLEAR_TOGGLE bit after
> xhci_endpoint_reset, even if it is failed.
>
> Signed-off-by: Ding Hui <dinghui@sangfor.com.cn>
> ---
> drivers/usb/host/xhci.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

Shouldn't this have a Fixes: tag on it and be backported to the affected
stable trees?

thanks,

greg k-h

\
 
 \ /
  Last update: 2020-08-21 09:31    [W:0.031 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site