Problem with gen 1 Ipod (firewire) and linux

Andrew de Quincey adq_dvb at lidskialf.net
Mon Dec 5 11:58:32 PST 2005


Hi I'm using HAL 0.5.5.1 with linux kernel 2.6.14 connected via iee1394 (only 
option on this ipod). My ipod is not being detected properly: specifically 
HAL does see it, but does not do anything with it. Device nodes are created 
fine by udev , and I can mount it manually.

I've tracked this down to:

hald/blockdev.c:
                        switch (type) {
                        case 0: /* Disk */
                                hal_device_property_set_string (d, 
"storage.drive_type", "disk");
                                break;

                        case 5: /* CD-ROM */
                                hal_device_property_set_string (d, 
"storage.drive_type", "cdrom");
                                break;

                        default:
                                goto error;
                        }

With some debug tracing, I find my ipod is being returned with type == 14, 
which according to the scsi includes is TYPE_RBC.

I had a mess about in sbp2.c in the kernel, and found it is supposed to 
replace TYPE_RBC with TYPE_DISK when an INQUIRY is sent:

                        if ((scsi_buf[0] & 0x1f) == TYPE_RBC) {
                                SBP2_DEBUG("Changing TYPE_RBC to TYPE_DISK");
                                scsi_buf[0] &= 0xe0;
                        }


HOWEVER: this doesn't work because my debug shows that my ipod _really_ 
returns 0xc8 in scsi_buf[0] above - ie. type 0x08 , or TYPE_MEDIUM_CHANGER.

Something is wrong somewhere.... but where is the bug?


More information about the hal mailing list