summaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-6.1/950-0671-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch
blob: b852bad9044a055db54d5b173429138943dcc3a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 0103035be2b28a8dbb5ccc207c61043d5eb1bc18 Mon Sep 17 00:00:00 2001
From: Jonathan Bell <jonathan@raspberrypi.com>
Date: Fri, 10 Mar 2023 14:21:42 +0000
Subject: [PATCH] usb: xhci: drop and add the endpoint context in
 xhci_fixup_endpoint()

Setting both the Drop and Add bits on the input context prevents the
corruption of split transactions seen with the BCM2711 XHCI controller,
which is a dwc3 variant.

This is a downstream feature that allows usbhid to restrict polling
intervals on mice and keyboards, and was only tested on a VL805 which
didn't complain about the fact the endpoint got added twice.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
---
 drivers/usb/host/xhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1732,7 +1732,7 @@ static void xhci_fixup_endpoint(struct u
 		return;
 	}
 	ctrl_ctx->add_flags = xhci_get_endpoint_flag_from_index(ep_index);
-	ctrl_ctx->drop_flags = 0;
+	ctrl_ctx->drop_flags = ctrl_ctx->add_flags;
 
 	spin_unlock_irqrestore(&xhci->lock, flags);