Re: USB errors with 2.6.16.5 kernel and iPod



On Sun, 30 Apr 2006 08:30:58 +1000, Brad staggered into the Black Sun
and said:
I have an Apple iPod shuffle which I've quite happily been using for
over a year with my 6-year-old PC running Linux 2.6.1. I could quite
happily mount the scsi device (/dev/sdb1) for the iPod over USB,
create a filesystem and copy 500+MB of files in a few minutes.

Hm. You said you were using uhci-hcd, which has a max speed of 12
Mbit/s and a real-world speed of ~800K/s according to my tests with USB
1 keychain drives. That's ~11 minutes to copy 500M. Are you sure this
wasn't using ehci-hcd?

I've just upgraded to the latest stable kernel - 2.6.16.5 - and am now
experiencing a host of errors.

usb 2-2: reset full speed USB device using uhci_hcd and address 2
appears to be the first error and the crux of the problem.

Aye. No idea why it's happening though. It might help to rmmod
uhci_hcd and modprobe it with debug=2 (or 3) and see what you get in the
logs. That's the only MODULE_PARM that uhci_hcd takes, so no, there's
no way to make it go slower.

kernel: sd 3:0:0:0: SCSI error: return code = 0x50000

No idea what that means. It might be "initiator error" combined with
other unknown statuses. It also might be the digestive system of a
badger for all I know; IANAKernelHacker.

I couldn't find any easy way to get my modules - would uhci_hcd be the
critical one? - to access the iPod at a slower speed.

Hm. Maybe mount it with "sync"? That slows things down. Also, if
2.6.16.5 is indeed the latest kernel, it may have bugs that earlier
versions didn't have. The 2.6.15.6 kernel works fine with my iPod mini
(though I have it connected via USB2, not USB1, natch.)

As a workaround I used a loopback device to set up my filesystem and
then wrote a quick C program to write the data file out sloooowly to
the iPod's scsi block device, pausing 3.5 milliseconds after writing
each kilobyte block. It took about half an hour, but this process
worked perfectly

I think you may have found a kernel bug somewhere. I don't know how
you'd go about tracking it down other than turning on all the verbose
debugging options you can find, and possibly sprinkling printk()s in
places where you suspect trouble and recompiling those modules.

is there a way I can fix it up myself, to get reliable USB writes to
the iPod? Can I instruct the USB device drivers to slow down somehow?
Module parameter?

Not in uhci_hcd. Maybe mounting it with sync will help, maybe there's
some brain damage in this version's uhci_hcd. HTH anyway,

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.brainbench.com / "He is a rhythmic movement of the
-----------------------------/ penguins, is Tux." --MegaHAL
.



Relevant Pages

  • Re: USB errors with 2.6.16.5 kernel and iPod
    ... happily mount the scsi device for the iPod over USB, ... Mbit/s and a real-world speed of ~800K/s according to my tests with USB ... Module parameter? ...
    (comp.os.linux.misc)
  • RE: iPod not recognized when USB 2.0 enabled
    ... I did the same thing and figured out that when my printer's power is ... on, the iPod isn't recognized, when it's off, it is. ... network adapter plugged into my USB hub). ... not recognizing my iPod mini when I plug it in (i.e., ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: I cant mount my USB thumb drive or ipod -- no /dev/da*
    ... I'm using FreeBSD 6.0 RELEASE with the GENERIC kernel. ... it has all of the necessary pieces to allow usb drives). ... When I plug my ipod into my computer, ... Apple iPod mini, rev 2.00/0.01, addr 2 ...
    (freebsd-questions)
  • Re: How do you reset an iPod mini?
    ... I have no charger for it. ... USB cable for it. ... I had this problem with my iPod Photo ... provide power to the iPod without trying to mount it. ...
    (comp.sys.mac.apps)
  • I cant mount my USB thumb drive or ipod -- no /dev/da*
    ... it has all of the necessary pieces to allow usb drives). ... When I plug my ipod into my computer, ... Apple iPod mini, rev 2.00/0.01, addr 2 ... line explaining that umass0 sees the item. ...
    (freebsd-questions)