usb: increase usb thread stack size

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Sun, 3 May 2026 14:16:09 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit e50ad40814b077d19f07447afec27b374e495e7a
Author: mojyack <[email protected]>
Date:   Thu Nov 27 17:16:14 2025 +0900

    usb: increase usb thread stack size
    
    Change-Id: I07283a68056e095efba8019dac2aa37d65c0ef6c

diff --git a/firmware/usb.c b/firmware/usb.c
index c3e35d22b3..ae9778c299 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -86,7 +86,12 @@ static int usb_mmc_countdown = 0;
 #ifndef USB_EXTRA_STACK
 #   define USB_EXTRA_STACK 0x0 /*Define in firmware/export/config/[target].h*/
 #endif
-static long usb_stack[(DEFAULT_STACK_SIZE*4 + DUMP_BMP_LINESIZE + USB_EXTRA_STACK)/sizeof(long)];
+#ifdef USB_ENABLE_IAP
+#define IAP_EXTRA_STACK DEFAULT_STACK_SIZE*2
+#else
+#define IAP_EXTRA_STACK 0
+#endif
+static long usb_stack[(DEFAULT_STACK_SIZE*4 + DUMP_BMP_LINESIZE + IAP_EXTRA_STACK + USB_EXTRA_STACK)/sizeof(long)];
 static const char usb_thread_name[] = "usb";
 static unsigned int usb_thread_entry = 0;
 static bool usb_monitor_enabled = false;
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs