u-boot/include/linux
Stephan Gerhold 59310d1ecb usb: gadget: introduce 'enabled' flag in struct usb_ep
f_acm calls usb_ep_disable(f_acm->ep_notify) unconditionally in
acm_start_ctrl(), even if the USB endpoint was never enabled before. This
causes crashes for some UDC drivers (e.g. ci_udc), because they dereference
data structures that are assigned only after having called usb_ep_enable().

The f_acm driver in U-Boot is similar to the Linux driver, where this issue
does not occur because usb_ep_disable() and usb_ep_enable() internally
track the enabled state. In Linux this change was made in commit
b0bac2581c19 ("usb: gadget: introduce 'enabled' flag in struct usb_ep") by
Robert Baldyga.

Fix the crashes for f_acm by making the same change in U-Boot. This makes
the API less bug-prone and avoids introducing crashes when adapting new
gadget drivers from Linux.

Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://lore.kernel.org/r/20250407-acm-fixes-v1-3-e3dcb592d6d6@linaro.org
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-04-23 09:50:52 +02:00
..
byteorder include: linux: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
clk
mfd/syscon mfd: syscon: atmel-smc: Add new helpers to ease SMC regs manipulation 2022-12-08 18:06:27 +02:00
mtd spi: drop unneeded spi.h header include from spinand.h 2025-04-16 16:51:45 -06:00
soc/ti firmware: ti_sci: Scan all device instances when releasing exclusive devices 2025-04-14 16:59:52 -06:00
unaligned linux/unaligned: remove unused access_ok.h 2023-05-31 14:05:34 -04:00
usb usb: gadget: introduce 'enabled' flag in struct usb_ep 2025-04-23 09:50:52 +02:00
apm_bios.h
apple-mailbox.h
arm-smccc.h firmware: psci: Fix bind_smccc_features psci check 2024-03-13 12:40:43 -04:00
asn1_ber_bytecode.h
asn1_decoder.h
asn1.h include: linux: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
bch.h
bitfield.h
bitmap.h linux/bitmap.h: add bitmap_empty helper 2024-07-26 01:28:09 +02:00
bitops.h include: linux: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
bitrev.h
bug.h
build_bug.h Fix sparse checks processing 2023-05-15 14:08:45 -04:00
clk-provider.h clk: clk-fixed-factor: Use struct udevice instead of struct device 2025-03-24 08:51:35 -03:00
compat.h Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
compiler_attributes.h
compiler_types.h compiler: Ensure __builtin_*_overflow() support 2024-08-15 16:14:36 -06:00
compiler-clang.h
compiler-gcc.h
compiler-intel.h
compiler.h
completion.h
const.h
crc7.h
crc16.h
crc32.h
ctype.h
delay.h
dma-direction.h
dma-mapping.h
drm_dp_helper.h
edd.h include: linux: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
err.h include: linux: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
errno.h
ethtool.h include: linux: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
fb.h include: linux: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
if_ether.h
if_vlan.h
immap_qe.h qe: Add <config.h> to linux/immap_qe.h 2023-12-21 08:54:37 -05:00
input.h
intel-smc.h arm: socfpga: soc64: Update reset manager registers for F2S bridge 2025-04-22 11:47:39 +08:00
io.h
ioctl.h
iopoll.h
ioport.h
kbuild.h
kconfig.h kconfig: binman: Check for SPL instead of XPL 2024-10-11 11:44:48 -06:00
kernel.h mbedtls: add mbedtls into the build system 2024-10-14 17:58:12 -06:00
libfdt_env.h
libfdt.h
linkage.h
linux_string.h
list_sort.h
list.h linux: list: add a function to count list nodes 2024-07-31 09:53:01 +02:00
litex.h liteeth: LiteX Ethernet device 2022-11-28 10:25:17 -05:00
log2.h
lzo.h
math64.h
mbus.h
mdio.h net: phy: Add MDIO PCS 2.5G and 5G speed macros from Linux 2023-04-07 14:21:37 +02:00
mii.h include/linux/mii.h: Add <linux/types.h> 2023-11-07 14:50:52 -05:00
netdevice.h
oid_registry.h
poison.h
posix_types.h
printk.h
pruss_driver.h
psci.h
rational.h
rbtree_augmented.h include: linux: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
rbtree.h include: linux: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
screen_info.h
serial_reg.h include: linux: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
sizes.h
stat.h linux: Add generic struct stat {} 2025-04-02 20:00:59 -06:00
stddef.h Fix sparse checks processing 2023-05-15 14:08:45 -04:00
string.h lib: implement strnstr() 2025-02-12 12:37:12 -06:00
stringify.h
time.h include: linux: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
typecheck.h
types.h common: define time_t as 64bit 2023-07-25 12:44:46 -04:00
utf.h
xxhash.h
zstd_errors.h include: linux: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
zstd_lib.h include: linux: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
zstd.h lib: zstd: update to latest Linux zstd 1.5.2 2023-01-18 19:04:17 -05:00