USB errors with 2.6.16.5 kernel and iPod



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. The shuffle
would connect to my USB 1.1 port and, using the usual kernel modules:

usbcore
uhci_hcd
usb_storage
sd_mod

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.

I've just upgraded to the latest stable kernel - 2.6.16.5 - and
am now experiencing a host of errors when a process is part-way
through writing its full 500MB of data to the device. The
usual introductory kernel messages and then the logged critical errors
are as follows:

kernel: USB Universal Host Controller Interface driver v2.3
kernel: ACPI: PCI Interrupt 0000:00:04.2[D] -> Link [LNKD] -> GSI 5 (level, low) -> IRQ 5
kernel: uhci_hcd 0000:00:04.2: UHCI Host Controller
kernel: uhci_hcd 0000:00:04.2: new USB bus registered, assigned bus number 1
kernel: uhci_hcd 0000:00:04.2: irq 5, io base 0x0000b400
kernel: usb usb1: configuration #1 chosen from 1 choice
kernel: hub 1-0:1.0: USB hub found
kernel: hub 1-0:1.0: 2 ports detected
kernel: ACPI: PCI Interrupt 0000:00:04.3[D] -> Link [LNKD] -> GSI 5 (level, low) -> IRQ 5
kernel: uhci_hcd 0000:00:04.3: UHCI Host Controller
kernel: uhci_hcd 0000:00:04.3: new USB bus registered, assigned bus number 2
kernel: uhci_hcd 0000:00:04.3: irq 5, io base 0x0000b000
kernel: usb usb2: configuration #1 chosen from 1 choice
kernel: hub 2-0:1.0: USB hub found
kernel: hub 2-0:1.0: 2 ports detected
kernel: usb 2-2: new full speed USB device using uhci_hcd and address 2
kernel: usb 2-2: configuration #1 chosen from 2 choices
kernel: scsi3 : SCSI emulation for USB Mass Storage devices
kernel: Vendor: Apple Model: iPod Rev: 2.70
kernel: Type: Direct-Access ANSI SCSI revision: 04
kernel: SCSI device sdb: 1010432 512-byte hdwr sectors (517 MB)
kernel: sdb: Write Protect is off
kernel: SCSI device sdb: 1010432 512-byte hdwr sectors (517 MB)
kernel: sdb: Write Protect is off
kernel: sdb: sdb1
kernel: sd 3:0:0:0: Attached scsi removable disk sdb
kernel: usb 2-2: reset full speed USB device using uhci_hcd and address 2
kernel: usb 2-2: reset full speed USB device using uhci_hcd and address 2
last message repeated 2 times
last message repeated 2 times
kernel: sd 3:0:0:0: SCSI error: return code = 0x50000
kernel: usb 2-2: reset full speed USB device using uhci_hcd and address 2
kernel: usb 2-2: reset full speed USB device using uhci_hcd and address 2
last message repeated 2 times
last message repeated 2 times
kernel: sd 3:0:0:0: SCSI error: return code = 0x50000

I.e. the error message:

kernel: usb 2-2: reset full speed USB device using uhci_hcd and address 2

appearing to be the first error and the crux of the problem.

I spent a fair bit of time searching the web but couldn't find anything
that would fix my problem. It *seems* to be speed-related - the
kernel messages that are logged when the device is initially connected
state that it is at 'full' speed, and the error message also
mentions that term - plus a couple of articles on the web seemed to
state that one could have 'full' or 'low' speed USB devices.

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. No
module parameter that one can use to tell it to run slower (that
I could see).

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; no error messages, and I was able to
mount the iPod, check its contents, and then play it to check
that everything was fine.

So, in summary, it seems to me:

- hardware worked fine under 2.6.1 using USB 1.1

- failed repeatedly with 2.6.16.5 kernel, nothing else changed

- problem seems to be a case of the USB driver writing
data out *too fast*

- this supposition seems to be proven by slowing down
writes from the application side.

In googling I couldn't find any obvious reports of this as a bug,
but I also don't know where one goes directly to see the current
bug list. Could anyone tell me:

o is this a known bug? In which case I can wait for it to be
fixed; or

o 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?

Many thanks for any assistance,


Brad
.



Relevant Pages

  • 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)
  • PROBLEM: Oops when using emi62 with 2.6.28
    ... With kernel 2.6.28 (and I don't really know which version of the kernel ... emi62 soundcard usb firmware oops ... 2000-2fff: PCI Bus 0000:02 ... # Infrared-port device drivers ...
    (Linux-Kernel)
  • problem with linux-2.6.28
    ... ACPI: Local APIC address 0xfee00000 ... Allocating PCI resources starting at cc000000 ... 3243604k/3276480k available (3222k kernel code, 31608k reserved, 1142k data, 312k init, 23 ... USB 2.0 'Enhanced' Host Controller Driver ...
    (Linux-Kernel)
  • USB errors with 2.6.16.5 kernel and iPod
    ... would connect to my USB 1.1 port and, using the usual kernel modules: ... I could quite happily mount the scsi device for the iPod ... over USB, create a filesystem and copy 500+MB of files in a few minutes. ... state that it is at 'full' speed, and the error message also ...
    (comp.os.linux.misc)
  • Ive just installed SuSE 8.2 and its not recognising my Alcatel
    ... SpeedTouch USB Modem. ... Do I need to patch the kernel or pppd? ...
    (alt.os.linux.suse)