dwc_otg: Avoid the use of align_buf for short packets
authorDom Cobley <popcornmix@gmail.com>
Thu, 7 Dec 2023 17:30:53 +0000 (17:30 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:22 +0000 (11:35 +0000)
commit8b858f623caf2df6a0b1e19038beefde6038e503
tree0574cd1865d162b59a6636e4a061112d67cbd409
parent93353fcd4e45cd0b96fb61ca5a88f80aa87c4f50
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