On Fri, Jun 25, 2004 at 05:40:39PM +0200, David Zeuthen wrote: > > Hi, > > I have a few questions regarding the usb-storage module. > > First, I have a external enclosure for an ATA disk, and I'd like to > obtain the unique serial number. If this disk were connected to a ATA > controller, I would have used hdparm, but since usb-storage exposes the > device as a SCSI device I've tried 'scsi_id /dev/sda' (e.g. reading page > 0x80/0x83) but with no luck. Is this at all possible?
It's possible only with USB/ATA converter chips which map the SCSI functionality onto the ATA functionality. This is not required behavior. > Second, I also a have a USB floppy drive and the only way I've found to > determine it's a floppy drive (from a program that is :-), is by looking > at /proc/scsi/usb-storage/<hostnumber> and checking that the Protocol > line says it a UFI interface - the 'type' exported in sysfs for the scsi > device says 0, e.g. disk. I know I could check the USB device and/or > interface (class, subClass, protocol) tupple for at least the type, but > I think this sounds unsafe. UFI does not necessarily indicate a floppy. There is a high rate of correlation, but it's not guaranteed. In fact, as far as I know, there really is no way to be 100% certain that it's a floppy. The interface doesn't expose enough information to be certain. > So, I guess my question really boils down to this: is there any way to > reliably determine the characteristics and vital product data of a SCSI > device exported by usb-storage kernel module, like whether it's one of > (floppy,cdrom,tape,disk), whether it uses removable media and so on? Removeable media is indicated by the RMB bit of the INQUIRY data. However, a lot of devices have that bit set/unset incorrectly. Matt -- Matthew Dharm Home: [EMAIL PROTECTED] Maintainer, Linux USB Mass Storage Driver We can customize our colonels. -- Tux User Friendly, 12/1/1998
pgphnrMmiqXdT.pgp
Description: PGP signature