[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <576e0013-a11e-4ffb-3964-cc9aba204245@sangfor.com.cn>
Date: Sat, 22 Aug 2020 07:58:29 +0800
From: Ding Hui <dinghui@...gfor.com.cn>
To: Mathias Nyman <mathias.nyman@...ux.intel.com>,
Greg KH <gregkh@...uxfoundation.org>
Cc: mathias.nyman@...el.com, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] xhci: Always restore EP_SOFT_CLEAR_TOGGLE even if ep
reset failed
On 2020/8/21 4:44 下午, Mathias Nyman wrote:
> On 21.8.2020 10.31, Greg KH wrote:
>> 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@...gfor.com.cn>
>
> Thanks, nice catch.
>
>>> ---
>>> 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?
Sorry for missing the tags, this is my first kernel patch :-)
>
> It should, but I like this patch and want it in, so I'll add the tags this time.
Thanks for correcting my commit msg
>
> Thanks
> -Mathias
>
--
Thanks,
-dinghui
Powered by blists - more mailing lists