usb:composite: data abort on second ums launch
Zixun LI
admin at hifiphile.com
Mon Mar 24 11:42:05 CET 2025
Hi,
I encountered a data abort on the 2nd "ums 0 mmc 0" command on
u-boot-at91 2024.07 with sam9x60-curiosity board.
U-Boot> ums 0 mmc 0
UMS: LUN 0, dev mmc 0, hwpart 0, sector 0x0, count 0x1d29000
CTRL+C - Operation aborted
U-Boot> ums 0 mmc 0
UMS: LUN 0, dev mmc 0, hwpart 0, sector 0x0, count 0x1d29000
data abort
pc : [<27f93428>] lr : [<27ef7e80>]
reloc pc : [<23f16428>] lr : [<23e7ae80>]
sp : 27ef4cf0 ip : a5200000 fp : 23f6915c
r10: deadbeef r9 : 27ef7e80 r8 : 27f7d2a0
r7 : a5200000 r6 : 00000000 r5 : 00000000 r4 : 27f01668
r3 : 00000000 r2 : 00000000 r1 : 27fe1d88 r0 : 27f01668
Flags: nzCV IRQs off FIQs off Mode SVC_32 (T)
Code: 45ac d017 68c5 4667 (60fd) 60af
>From backtrace the abort happened in fREe_impl(), with some debugging
I've localized the abort in fact happened in fsg buffer allocation in
fsg_common_init() [1]
It looks like the buffer is not freed on driver unregister since
fsg_common_release() is only called if fsg_common_init() met an error.
[1] https://elixir.bootlin.com/u-boot/v2025.01/source/drivers/usb/gadget/f_mass_storage.c#L2511
More information about the U-Boot
mailing list