Files
openwrt-master/target/linux/bcm27xx/patches-6.6/950-0786-dwc_otg-Avoid-the-use-of-align_buf-for-short-packets.patch
domenico c06fb25d1f
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Initial commit
2025-06-24 14:35:53 +02:00

37 lines
1.2 KiB
Diff

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