From fce8248267751f5d99ac066bf8e206394e52a4c2 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Tue, 27 Jan 2026 13:05:33 -0500 Subject: [PATCH] usb: Hopefully resolve the red in 41f9285def First, leave USB_FULL_INIT on for all non-bootloader builds; this is needed for devices that don't have a USBSTACK (such as most hosted targets and ones that provide USB<>ATA in hardware) Then unwind another hack that is no longer needed now that USB_FULL_INIT is not set in most bootloaders. Change-Id: I00881ac76b2469e5cd7700bad2203c58ef1e09e7 --- firmware/usb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/firmware/usb.c b/firmware/usb.c index 318c3f07ac..49b4e70b3e 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -59,7 +59,7 @@ #include "iap.h" #endif -#if defined(HAVE_USBSTACK) && (!defined(BOOTLOADER) || defined(HAVE_BOOTLOADER_USB_MODE)) +#if (!defined(BOOTLOADER) || defined(HAVE_BOOTLOADER_USB_MODE)) #define USB_FULL_INIT #endif @@ -704,7 +704,6 @@ void usb_acknowledge(long id, intptr_t seqnum) { queue_post(&usb_queue, id, seqnum); } - #else /* !USB_FULL_INIT */ /* TODO: All of this can go away once usb_core.c is no longer built with BOOTLOADER && !HAVE_USB_BOOTLOADER_MODE */ @@ -816,7 +815,7 @@ bool usb_inserted(void) return usb_state == USB_INSERTED || usb_state == USB_POWERED; } -#if defined(HAVE_USBSTACK) && defined(USB_FULL_INIT) +#if defined(USB_FULL_INIT) bool usb_exclusive_storage(void) { /* Storage isn't actually exclusive until slave mode has been entered */