]> git.ipfire.org Git - thirdparty/openwrt.git/blob
f9aaba9f4889896baf4918a81ae4ce31716c9925
[thirdparty/openwrt.git] /
1 From 30f4b4a4b24c6bf12d6d43dedfba78b4fb80869b Mon Sep 17 00:00:00 2001
2 From: Dom Cobley <popcornmix@gmail.com>
3 Date: Thu, 7 Dec 2023 17:30:53 +0000
4 Subject: [PATCH 0786/1085] dwc_otg: Avoid the use of align_buf for short
5 packets
6
7 Recent kernels (from 6.5) fail to boot on Pi0-3.
8
9 This has been tracked down to the call to:
10 ret = usb_get_std_status(hdev, USB_RECIP_DEVICE, 0, &hubstatus);
11
12 returning garbage in hubstatus (it gets the uninitialised contents of
13 a kmalloc buffer that is not overwritten as expected).
14
15 As we don't have strong evidence that this code path has ever worked,
16 and it is causing a clear problem currently, lets disable it to
17 allow wider use of newer kernels.
18
19 Signed-off-by: Dom Cobley <popcornmix@gmail.com>
20 ---
21 drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 2 ++
22 1 file changed, 2 insertions(+)
23
24 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c
25 +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c
26 @@ -1339,8 +1339,10 @@ static void assign_and_init_hc(dwc_otg_h
27 * buffer.
28 */
29 wLength = ((uint16_t *)urb->setup_packet)[3];
30 + #if 0
31 if (hc->ep_is_in && wLength < 4)
32 ptr = hc->xfer_buff;
33 + #endif
34
35 hc->data_pid_start = qtd->data_toggle;
36 break;