diff options
author | Cástor Muñoz <cmvidal@gmail.com> | 2016-07-31 04:22:03 +0200 |
---|---|---|
committer | Franklin Wei <git@fwei.tk> | 2018-07-30 17:54:51 -0400 |
commit | 8f38f85fbde2ae78ba50cf9b9f54fbf9d25b4a45 (patch) | |
tree | c77f8d200851bacd94fd01a4b54a13578cb50a24 /firmware/usbstack | |
parent | 210881ca35df0f05a11c2cf88cd73ddab18cff1d (diff) |
Workaround for usb_storage_init_connection() panic
For s5l8701, s5l8702 and as3525v2 targets.
The crash occurs when USB is inserted or extracted while the playlist
is being loaded or updated (it could take a few seconds for huge
playlists), at this point all buflib memory is allocated and not freed
before usb_starage_init_connection() is executed.
This workaround mitigates this panic by using static memory for USB
buffers, so this memory cannot be used for other tasks, in addition
the problem still persist when playlist load is 'paused' by USB
insertion and then updated after USB extraction.
Change-Id: Iff1db5a949361fd543e0b494924d1f2906c84b5e
Diffstat (limited to 'firmware/usbstack')
-rw-r--r-- | firmware/usbstack/usb_storage.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c index 70587dfed4..c42cc830ee 100644 --- a/firmware/usbstack/usb_storage.c +++ b/firmware/usbstack/usb_storage.c @@ -434,6 +434,7 @@ void usb_storage_init_connection(void) state = WAITING_FOR_COMMAND; #if (CONFIG_CPU == IMX31L || defined(CPU_TCC77X) || defined(CPU_TCC780X) || \ + CONFIG_CPU == S5L8702 || CONFIG_CPU == S5L8701 || CONFIG_CPU == AS3525v2 || \ defined(BOOTLOADER) || CONFIG_CPU == DM320) && !defined(CPU_PP502x) static unsigned char _cbw_buffer[MAX_CBW_SIZE] USB_DEVBSS_ATTR __attribute__((aligned(32))); |