2004-11-07 09:05:10

by Jörg Spilker

[permalink] [raw]
Subject: Apple Ipod doesn't work with USB on linux (but works with FireWire)

Hi,

i recently purchased a new Ipod Mini which i initially used via Firewire on my Laptop with windows.
Then i tried to change to Linux (using gtkpod for managing my playlists). Because i want to leave the
firewire cable connected to the laptop, i tried using the USB variant on Linux. My first try was with
SuSE 9.0 and a 2.4.x kernel. Unfortunately with no success. Same errors as you see here (now with
SuSE 9.2 and kernel 2.6.8).

Nov 7 00:45:17 lotus kernel: usb 4-5: new high speed USB device using address 8
Nov 7 00:45:17 lotus kernel: usb 4-5: Product: iPod mini
Nov 7 00:45:17 lotus kernel: usb 4-5: Manufacturer: Apple
Nov 7 00:45:17 lotus kernel: usb 4-5: SerialNumber: 0000009056D9
Nov 7 00:45:17 lotus kernel: scsi4 : SCSI emulation for USB Mass Storage devices
Nov 7 00:45:17 lotus kernel: Vendor: Apple Model: iPod Rev: 1.61
Nov 7 00:45:17 lotus kernel: Type: Direct-Access ANSI SCSI revision: 02
Nov 7 00:45:18 lotus kernel: SCSI device sda: 7999488 512-byte hdwr sectors (4096 MB)
Nov 7 00:45:18 lotus kernel: sda: Write Protect is off
Nov 7 00:45:18 lotus kernel: sda: Mode Sense: 64 00 00 08
Nov 7 00:45:18 lotus kernel: sda: assuming drive cache: write through
Nov 7 00:45:18 lotus kernel: sda:end_request: I/O error, dev sda, sector 7999480
Nov 7 00:45:18 lotus kernel: Buffer I/O error on device sda, logical block 999935
Nov 7 00:45:18 lotus kernel: end_request: I/O error, dev sda, sector 7999480
Nov 7 00:45:18 lotus kernel: Buffer I/O error on device sda, logical block 999935
Nov 7 00:45:18 lotus kernel: sda1 sda2
Nov 7 00:45:18 lotus kernel: Attached scsi removable disk sda at scsi4, channel 0, id 0, lun 0
Nov 7 00:45:18 lotus kernel: Attached scsi generic sg0 at scsi4, channel 0, id 0, lun 0, type 0
Nov 7 00:45:18 lotus kernel: USB Mass Storage device found at 8
Nov 7 00:45:28 lotus /etc/dev.d/block/50-hwscan.dev[17084]: new block device /block/sda/sda1
Nov 7 00:45:28 lotus /etc/dev.d/block/50-hwscan.dev[17085]: new block device /block/sda/sda2
Nov 7 00:45:28 lotus /etc/dev.d/block/51-subfs.dev[17100]: mount block device /block/sda/sda1
Nov 7 00:45:28 lotus /etc/dev.d/block/51-subfs.dev[17105]: mount block device /block/sda/sda2
Nov 7 00:45:28 lotus kernel: end_request: I/O error, dev sda, sector 80325
Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 0
Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 1
Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 2
Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 3
Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 4
Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 5
Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 6
Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 7
Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 8
Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 9
Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 10
Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 11

so i removed the firewire cable from the laptop and attached it to my workstation. As you can
see everything is fine now. I suspect it has something to do with the usb mass storage
driver.

Nov 7 07:37:24 lotus kernel: ieee1394: Node changed: 0-00:1023 -> 0-01:1023
Nov 7 07:37:26 lotus kernel: ieee1394: Node changed: 0-01:1023 -> 0-00:1023
Nov 7 07:37:28 lotus kernel: ohci1394: fw-host0: SelfID received, but NodeID invalid (probably new bus reset occurred): 0800FFC0
Nov 7 07:37:28 lotus kernel: ieee1394: Node changed: 0-00:1023 -> 0-01:1023
Nov 7 07:37:31 lotus kernel: ieee1394: Node added: ID:BUS[0-00:1023] GUID[000a2700029056d9]
Nov 7 07:37:36 lotus /sbin/hotplug[4751]: ... no drivers for IEEE1394 product 0x/0x/0x
Nov 7 07:37:36 lotus /sbin/hotplug[4777]: ... no drivers for IEEE1394 product 0x/0x/0x
Nov 7 07:37:37 lotus kernel: sbp2: $Rev: 1219 $ Ben Collins <[email protected]>
Nov 7 07:37:37 lotus kernel: scsi5 : SCSI emulation for IEEE-1394 SBP-2 Devices
Nov 7 07:37:38 lotus kernel: ieee1394: sbp2: Logged into SBP-2 device
Nov 7 07:37:38 lotus kernel: ieee1394: Node 0-00:1023: Max speed [S400] - Max payload [2048]
Nov 7 07:37:38 lotus kernel: Vendor: Apple Model: iPod Rev: 1.61
Nov 7 07:37:38 lotus kernel: Type: Direct-Access ANSI SCSI revision: 02
Nov 7 07:37:38 lotus kernel: SCSI device sda: 7999488 512-byte hdwr sectors (4096 MB)
Nov 7 07:37:38 lotus kernel: sda: Write Protect is off
Nov 7 07:37:38 lotus kernel: sda: Mode Sense: 04 00 00 00
Nov 7 07:37:38 lotus kernel: SCSI device sda: drive cache: write through
Nov 7 07:37:38 lotus kernel: sda:end_request: I/O error, dev sda, sector 7999480
Nov 7 07:37:38 lotus kernel: Buffer I/O error on device sda, logical block 999935
Nov 7 07:37:39 lotus kernel: end_request: I/O error, dev sda, sector 7999480
Nov 7 07:37:39 lotus kernel: Buffer I/O error on device sda, logical block 999935
Nov 7 07:37:39 lotus kernel: sda1 sda2
Nov 7 07:37:39 lotus kernel: Attached scsi removable disk sda at scsi5, channel 0, id 0, lun 0
Nov 7 07:37:39 lotus kernel: Attached scsi generic sg0 at scsi5, channel 0, id 0, lun 0, type 0
Nov 7 07:37:48 lotus /etc/dev.d/block/50-hwscan.dev[5078]: new block device /block/sda/sda1
Nov 7 07:37:48 lotus /etc/dev.d/block/50-hwscan.dev[5079]: new block device /block/sda/sda2
Nov 7 07:37:48 lotus /etc/dev.d/block/50-hwscan.dev[5080]: new block device /block/sda
Nov 7 07:37:48 lotus /etc/dev.d/block/51-subfs.dev[5091]: mount block device /block/sda/sda1
Nov 7 07:37:48 lotus /etc/dev.d/block/51-subfs.dev[5101]: mount block device /block/sda/sda2
Nov 7 07:37:48 lotus /etc/dev.d/block/51-subfs.dev[5167]: mount block device /block/sda
Nov 7 07:37:59 lotus /etc/dev.d/block/51-subfs.dev[5101]: mount disk/by-path/ieee1394-000a2700029056d9-0-0p2
Nov 7 07:41:24 lotus kernel: ieee1394: Node changed: 0-01:1023 -> 0-00:1023
Nov 7 07:41:24 lotus kernel: ieee1394: Node suspended: ID:BUS[0-00:1023] GUID[000a2700029056d9]
Nov 7 07:41:34 lotus /etc/dev.d/block/51-subfs.dev[6235]: umount block device /block/sda/sda1
Nov 7 07:41:34 lotus /etc/dev.d/block/51-subfs.dev[6276]: umount block device /block/sda
Nov 7 07:41:34 lotus /etc/dev.d/block/51-subfs.dev[6251]: umount block device /block/sda/sda2
Nov 7 07:41:34 lotus /etc/dev.d/block/51-subfs.dev[6235]: umount: /dev/sda1: not mounted
Nov 7 07:41:35 lotus /etc/dev.d/block/51-subfs.dev[6276]: umount: /dev/sda: not mounted

so any idea why the Ipod is not working as a storage device? Other devices like my digicam
(USB 1.0) are working as storage device.

Greetings, Joerg


2004-11-07 09:41:37

by Harald Dunkel

[permalink] [raw]
Subject: Re: Apple Ipod doesn't work with USB on linux (but works with FireWire)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

J?rg Spilker wrote:
| Hi,
|
| i recently purchased a new Ipod Mini which i initially used via Firewire on my Laptop with windows.
| Then i tried to change to Linux (using gtkpod for managing my playlists). Because i want to leave the
| firewire cable connected to the laptop, i tried using the USB variant on Linux. My first try was with
| SuSE 9.0 and a 2.4.x kernel. Unfortunately with no success. Same errors as you see here (now with
| SuSE 9.2 and kernel 2.6.8).
|
| Nov 7 00:45:17 lotus kernel: usb 4-5: new high speed USB device using address 8
| Nov 7 00:45:17 lotus kernel: usb 4-5: Product: iPod mini
| Nov 7 00:45:17 lotus kernel: usb 4-5: Manufacturer: Apple
| Nov 7 00:45:17 lotus kernel: usb 4-5: SerialNumber: 0000009056D9
| Nov 7 00:45:17 lotus kernel: scsi4 : SCSI emulation for USB Mass Storage devices
| Nov 7 00:45:17 lotus kernel: Vendor: Apple Model: iPod Rev: 1.61
| Nov 7 00:45:17 lotus kernel: Type: Direct-Access ANSI SCSI revision: 02
| Nov 7 00:45:18 lotus kernel: SCSI device sda: 7999488 512-byte hdwr sectors (4096 MB)
| Nov 7 00:45:18 lotus kernel: sda: Write Protect is off
| Nov 7 00:45:18 lotus kernel: sda: Mode Sense: 64 00 00 08
| Nov 7 00:45:18 lotus kernel: sda: assuming drive cache: write through
| Nov 7 00:45:18 lotus kernel: sda:end_request: I/O error, dev sda, sector 7999480
| Nov 7 00:45:18 lotus kernel: Buffer I/O error on device sda, logical block 999935
| Nov 7 00:45:18 lotus kernel: end_request: I/O error, dev sda, sector 7999480
| Nov 7 00:45:18 lotus kernel: Buffer I/O error on device sda, logical block 999935
| Nov 7 00:45:18 lotus kernel: sda1 sda2
| Nov 7 00:45:18 lotus kernel: Attached scsi removable disk sda at scsi4, channel 0, id 0, lun 0
| Nov 7 00:45:18 lotus kernel: Attached scsi generic sg0 at scsi4, channel 0, id 0, lun 0, type 0
| Nov 7 00:45:18 lotus kernel: USB Mass Storage device found at 8
| Nov 7 00:45:28 lotus /etc/dev.d/block/50-hwscan.dev[17084]: new block device /block/sda/sda1
| Nov 7 00:45:28 lotus /etc/dev.d/block/50-hwscan.dev[17085]: new block device /block/sda/sda2
| Nov 7 00:45:28 lotus /etc/dev.d/block/51-subfs.dev[17100]: mount block device /block/sda/sda1
| Nov 7 00:45:28 lotus /etc/dev.d/block/51-subfs.dev[17105]: mount block device /block/sda/sda2
| Nov 7 00:45:28 lotus kernel: end_request: I/O error, dev sda, sector 80325
| Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 0
| Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 1
| Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 2
| Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 3
| Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 4
| Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 5
| Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 6
| Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 7
| Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 8
| Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 9
| Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 10
| Nov 7 00:45:28 lotus kernel: Buffer I/O error on device sda2, logical block 11
|

Metoo. I've got a similar problem with an external USB disk.
Not an ipod, but just a mass storage device.

Kernel is 2.6.10-rc1 .

Please mail if I can help.


Regards

Harri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQFBje2lUTlbRTxpHjcRAhvBAJ42LLg2MalAuRXU/9rS39G+PGhITgCfX7m3
8Qc9f1UMK8l0b3PI7I0sP+Y=
=DGNN
-----END PGP SIGNATURE-----

2004-11-07 10:13:40

by Avi Kivity

[permalink] [raw]
Subject: Re: Apple Ipod doesn't work with USB on linux (but works with FireWire)

As jeffmock notes in http://tinyurl.com/6lmwp, the Apple iPod lies about its
size. It hurts particularly badly in this case, since if you access the iPod
beyond its real (not advertised) size, it locks up, and as some partition
tables (EFI) are stored at the end of the device, it locks up on the instant
you plug it in.

Note that contrary to what Jeff says, the error is only one sector. Maybe he
tried to read using the block device and got bitten by readahead.

Signed-off-by: Avi Kivity <[email protected]>

--- linux-2.6.8-1.624.aviipod/drivers/usb/storage/unusual_devs.h.ipod 2004-10-29 19:25:48.884603153 +0200
+++ linux-2.6.8-1.624.aviipod/drivers/usb/storage/unusual_devs.h 2004-10-29 20:27:40.799654665 +0200
@@ -424,6 +424,13 @@
0 ),
#endif

+/* Reported by Avi Kivity <[email protected]> */
+UNUSUAL_DEV( 0x05ac, 0x1203, 0x0001, 0x0001,
+ "Apple",
+ "iPod",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY ),
+
#ifdef CONFIG_USB_STORAGE_JUMPSHOT
UNUSUAL_DEV( 0x05dc, 0x0001, 0x0000, 0x0001,
"Lexar",


Attachments:
ipod-is-an-unusual-dev.patch (1.01 kB)

2004-11-17 04:33:39

by Jörg Spilker

[permalink] [raw]
Subject: Re: Apple Ipod doesn't work with USB on linux (but works with FireWire)

Am Sonntag, 7. November 2004 11:13 schrieb Avi Kivity:

Hi Avi,

> I recently posted a patch which fixes the problem; see attached.

thanks for the patch. I will try it. According to another tip i disabled EFI
GUID partition support and activated USB debugging. The Ipod is working
without problems with this config. I'll now try only the GUID support
disabled but again deactivating USB debugging. I will also try your patch.

Greetings, Joerg