950-0163-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch 1.1 KB

123456789101112131415161718192021222324252627282930
  1. From 3332d0fc788ad59620b58e0da94f734b337775ce Mon Sep 17 00:00:00 2001
  2. From: Jonathan Bell <[email protected]>
  3. Date: Fri, 10 Mar 2023 14:21:42 +0000
  4. Subject: [PATCH 0163/1085] usb: xhci: drop and add the endpoint context in
  5. xhci_fixup_endpoint()
  6. Setting both the Drop and Add bits on the input context prevents the
  7. corruption of split transactions seen with the BCM2711 XHCI controller,
  8. which is a dwc3 variant.
  9. This is a downstream feature that allows usbhid to restrict polling
  10. intervals on mice and keyboards, and was only tested on a VL805 which
  11. didn't complain about the fact the endpoint got added twice.
  12. Signed-off-by: Jonathan Bell <[email protected]>
  13. ---
  14. drivers/usb/host/xhci.c | 2 +-
  15. 1 file changed, 1 insertion(+), 1 deletion(-)
  16. --- a/drivers/usb/host/xhci.c
  17. +++ b/drivers/usb/host/xhci.c
  18. @@ -1587,7 +1587,7 @@ static void xhci_fixup_endpoint(struct u
  19. return;
  20. }
  21. ctrl_ctx->add_flags = xhci_get_endpoint_flag_from_index(ep_index);
  22. - ctrl_ctx->drop_flags = 0;
  23. + ctrl_ctx->drop_flags = ctrl_ctx->add_flags;
  24. spin_unlock_irqrestore(&xhci->lock, flags);