FS#13076 - iPod Classic (160GB Thick) - PANIC - usb_storage_init_connection ()

Attached to Project: Rockbox
Opened by A Man Eating Duck (A_Man_Eating_Duck) - Wednesday, 13 July 2016, 18:46 GMT
Task Type Bugs
Category Operating System/Drivers
Status Unconfirmed
Assigned To No-one
Operating System iPod Classic
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No



I have installed Rockbox build 0F89B04-160628 using this ( method.

I have created a dynamic playlist (Database > long select artist > current playlist > Queue Shuffled). Play and then pause the music and then hold the play button down to shutdown rockbox. Plug in USB cable from your computer (Win10) in to the iPod and the iPod should start powering on and then a white *panic* screen should appear.

Workaround is to have Rockbox already fully booted before plugging in a USB cable from the computer.

This task depends upon

Comment by Cástor Muñoz (prof_wolfff) - Wednesday, 13 July 2016, 22:43 GMT
I got the same kind of panic while testing the new Designware USB driver ( It occurs when the USB is disconnected and reconnected quickly, first appeared in the Nano2G, then on Classic, and finally Sansas. It is not a driver issue, it seems like a RB issue, probably affecting other targets.

I am focused on Classic target, so don't know too much about common RB code, the panic is due no memory available on libbuf, a quick grep for core_alloc_maximum() shows that this function is used on playlist.c, therefore I am figuring the panic occurs when the USB is connected before this memory is released.

Applying this patch solves the issue, other targets are doing the same, but it is a workaround to allocate USB buffers statically, this memory is 'lost' and never used for audio. A 'real' fix should be done by someone who has more knowledge about RB code.