Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

x1000: fix hang that may occur in USB mode

Upon getting a USB reset, the USB core will update charging
current by calling usb_charging_maxcurrent_change(). On all
current X1000 targets this may cause a hang, since changing
the charge current involves a blocking I2C transaction.

Eg. if the host issues a reset when we're already configured
as part of error recovery, the change from 500 mA -> 100 mA
will cause a hang.

Change-Id: I5b45272c01fa16b179ae3d16bbc50c7fab9a416b

+9
+1
firmware/export/config/erosqnative.h
··· 114 114 #define USB_DEVBSS_ATTR __attribute__((aligned(32))) 115 115 #define HAVE_USB_POWER 116 116 #define HAVE_USB_CHARGING_ENABLE 117 + #define HAVE_USB_CHARGING_IN_THREAD 117 118 #define TARGET_USB_CHARGING_DEFAULT USB_CHARGING_FORCE 118 119 #define HAVE_BOOTLOADER_USB_MODE 119 120 #endif
+1
firmware/export/config/fiiom3k.h
··· 114 114 #define USB_DEVBSS_ATTR __attribute__((aligned(32))) 115 115 #define HAVE_USB_POWER 116 116 #define HAVE_USB_CHARGING_ENABLE 117 + #define HAVE_USB_CHARGING_IN_THREAD 117 118 #define TARGET_USB_CHARGING_DEFAULT USB_CHARGING_FORCE 118 119 #define HAVE_BOOTLOADER_USB_MODE 119 120 #endif
+1
firmware/export/config/shanlingq1.h
··· 104 104 #define USB_DEVBSS_ATTR __attribute__((aligned(32))) 105 105 #define HAVE_USB_POWER 106 106 #define HAVE_USB_CHARGING_ENABLE 107 + #define HAVE_USB_CHARGING_IN_THREAD 107 108 #define HAVE_BOOTLOADER_USB_MODE 108 109 #endif 109 110
+6
firmware/usbstack/usb_core.c
··· 928 928 usb_address = 0; 929 929 usb_state = DEFAULT; 930 930 #ifdef HAVE_USB_CHARGING_ENABLE 931 + #ifdef HAVE_USB_CHARGING_IN_THREAD 932 + /* On some targets usb_charging_maxcurrent_change() cannot be called 933 + * from an interrupt handler; get the USB thread to do it instead. */ 934 + usb_charger_update(); 935 + #else 931 936 usb_charging_maxcurrent_change(usb_charging_maxcurrent()); 937 + #endif 932 938 #endif 933 939 } 934 940