From 8f38f85fbde2ae78ba50cf9b9f54fbf9d25b4a45 Mon Sep 17 00:00:00 2001 From: Cástor Muñoz Date: Sun, 31 Jul 2016 04:22:03 +0200 Subject: 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 --- firmware/usbstack/usb_storage.c | 1 + 1 file changed, 1 insertion(+) 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))); -- cgit