Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Drivers
  • Assigned To No-one
  • Operating System iPod Nano 2G
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.4
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by liar - 2010-01-04
Last edited by Buschel - 2011-02-13

FS#10894 - iPod Nano 2G USB Issues

the nano2g usb driver in rockbox contains many bugs.

those do not happen on all nano2gs(they all behave very different):

1.1. if the usb cable is connected during boot the ipod freezes(backlight thread still works).

commenting out while (GRSTCTL & 1); in firmware/target/arm/usb-s3c6400x.c in usb_reset does not freeze the nano2g during boot(but 1.2. still happens on some players). the ipod needs to be reset by pressing menu+select.

1.2. the ipod freezes after the usb cable gets connected(after some seconds). but its a very “hard” freeze. nothing does work, backlight thread and everything do not work anymore. even interrupts are not triggered anymore. the ipod needs to be reset by menu+select

commenting out usb_drv_recv and usb_drv_send in request_handler_interface_standard in firmware/usbstack/usb_core.c after case USB_REQ_GET_STATUS makes it working again.
BUT thats a VERY UGLY and strange HACK

2. some ipods show panc stkov usb. even if we increase the usb stack size by 8kB they still panic.

Closed by  Buschel
2011-02-13 22:31
Reason for closing:  Fixed
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Was reported to work fine with svn (r29299).

liar commented on 2010-01-05 21:11

1.2 happens when the driver sends data with content 0. (response_data[0]=0;)
i am not sure if that happens with every message where response_data[0]=0. i need to check that

liar commented on 2010-01-06 18:14

1.2 may also have to do with calls like:
usb_drv_recv(EP_CONTROL,NULL,0);
if i comment out those messages rockbox does not freeze(but that may also be a side effect).

i think it is only coincidence that it fails after the message with length==2(i've seen only one with length==2).
it seems the interrupts are already blocked before the message with length==2 is sent.

liar commented on 2010-01-12 00:11

this patch fixes 1.2(the usb chip wrote to a NULL pointer. that could have caused many other problems too).
it may even fix 2. but that needs testing.

there is a typo in the current svn which is fixed too(DIEPTSIZ instead of DOEPTSIZ in: ep_recv)

liar commented on 2010-01-12 23:13

this was not enough. sometimes this message appears in dmesg:
usb 1-3: ctrl urb status -75 received
and some messages afterwards the driver fails ⇒ many descriptor read errors in dmesg.

this did not happen on a windows computer, but i've only tried it 3 times there.

this patch may be a fix to this(wait before sending/recieving new data if the endpoint is busy) but it needs testing.

liar commented on 2010-01-12 23:14

sorry forgot to add the patch

liar commented on 2010-01-12 23:16

the previous one included some code comments which are unnecessary.

timn commented on 2010-01-24 17:32

I've applied the patch and was able to copy files from and to the iPod while having Rockbox started. After rebooting, though, the boot loader did not show up anymore. After connecting it with my computer, fdisk claimed that the partition table isn't valid.

Is this problem related to that patch? I had been using rockbox-svn with it as well as the NAND patch (from http://www.rockbox.org/tracker/task/10775) successfully without any data corruption so far. I'm wondering why this happened so sudden now.

liar commented on 2010-01-25 22:04

rebased to the current svn.

What's that status of this?

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing