]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
xhci: Don't clear hub TT buffer on ep0 protocol stall
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 21 Apr 2020 14:08:22 +0000 (17:08 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 25 May 2020 08:41:58 +0000 (10:41 +0200)
commitcb2699eab1e2cdb003fa5e2358e747fb1efa134a
tree0d451e1823c5ad7435b432ad178eaa007e5d510e
parent5242f7baba58701aecb69b5309cd4a6a45710f7c
xhci: Don't clear hub TT buffer on ep0 protocol stall

BugLink: https://bugs.launchpad.net/bugs/1876361
commit 8f97250c21f0cf36434bf5b7ddf4377406534cd1 upstream.

The default control endpoint ep0 can return a STALL indicating the
device does not support the control transfer requests. This is called
a protocol stall and does not halt the endpoint.

xHC behaves a bit different. Its internal endpoint state will always
be halted on any stall, even if the device side of the endpiont is not
halted. So we do need to issue the reset endpoint command to clear the
xHC host intenal endpoint halt state, but should not request the HS hub
to clear the TT buffer unless device side of endpoint is halted.

Clearing the hub TT buffer at protocol stall caused ep0 to become
unresponsive for some FS/LS devices behind HS hubs, and class drivers
failed to set the interface due to timeout:

usb 1-2.1: 1:1: usb_set_interface failed (-110)

Fixes: ef513be0a905 ("usb: xhci: Add Clear_TT_Buffer")
Cc: <stable@vger.kernel.org> # v5.3
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20200421140822.28233-4-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/usb/host/xhci-ring.c