usb: disable status event debouncing
rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Mon, 25 May 2026 07:01:50 -0400
| Newsgroups | gmane.comp.systems.archos.rockbox.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 727cb798e17287c61c8253d190df6008b590eb01 Author: Christian Soffke <[email protected]> Date: Mon May 18 18:42:58 2026 +0200 usb: disable status event debouncing commit 3307b04 didn't fully get rid of the PANICs observed on the Fiio M3K after adding a debounce interval for USB status by event in e75a3fb, so this reverts to the previous behavior Change-Id: I42b45a545eb1e26fa3ae3150504712079678f96e diff --git a/firmware/usb.c b/firmware/usb.c index 406a635140..bcc8bca9ed 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -565,6 +565,7 @@ void usb_charger_update(void) #endif #ifdef USB_STATUS_BY_EVENT +#if 0 /* usb_dw_gonak_effective: failed! PANIC */ static int usb_status_tmo_callback(struct timeout* tmo) { if(usb_monitor_enabled) @@ -586,11 +587,14 @@ static int usb_status_tmo_callback(struct timeout* tmo) return 0; } +#endif void usb_status_event(int current_status) { +#if 0 /* usb_dw_gonak_effective: failed! PANIC */ static struct timeout tmo; static int last_status = USB_EXTRACTED; +#endif /* Caller isn't expected to filter for changes in status. * current_status: @@ -599,9 +603,14 @@ void usb_status_event(int current_status) if(usb_monitor_enabled) { int oldstatus = disable_irq_save(); /* Dual-use function */ +#if 0 /* usb_dw_gonak_effective: failed! PANIC */ last_status = current_status; timeout_register(&tmo, usb_status_tmo_callback, USB_DEBOUNCE_TIME, (intptr_t)&last_status); +#else + queue_remove_from_head(&usb_queue, current_status); + queue_post(&usb_queue, current_status, 0); +#endif restore_irq(oldstatus); } } -- rockbox-cvs mailing list [email protected] https://lists.haxx.se/mailman/listinfo/rockbox-cvs