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.

pp5020: ata: do not yield in ata_wait_intrq()

Confirmed on iFlash-modded ipodvideo, USB mass storage connections
frequently fail with bus resets during mount on macOS, and trigger
"reset high-speed USB device" errors on Linux during sequential
reads.

The root cause is: storage_read_sectors() calls yield() via
ata_wait_intrq(), which switches to the main thread running
handle_usb_events() loop. This calls send_event(GUI_EVENT_ACTIONUPDATE),
triggering LCD redraw that takes approximately 110ms. This stalls the
ATA DMA completion, causing the USB bulk transfer to time out from the
host's perspective.

This commit removes the yield to prevent the reading thread from being
preempted by the lengthy LCD redraw during DMA completion.

This also improves sequential read throughput from ~13MB/s to ~18MB/s.

Change-Id: Ia552f97aa0169c93c4f21e250d13dc3a626661d4

mojyack e13befb9 f68bfadb

-1
-1
firmware/target/arm/pp/ata-pp5020.c
··· 154 154 if (IDE0_CFG & IDE_CFG_INTRQ) 155 155 return 1; 156 156 ata_keep_active(); 157 - yield(); 158 157 } while (TIME_BEFORE(current_tick, timeout)); 159 158 160 159 return 0; /* timeout */