On Tue, Sep 13, 2011 at 08:39:57PM +0400, Ilya Chernykh wrote:
On Tuesday 13 September 2011 20:11:32 Greg KH wrote:
Wow. On my system all disks except the DVD drive are4 shown as with sd* name. Does it mean the SATA drive is also a SCSI drive? I also have an IDE drive attached via a parallel cable, is it also a SCSI drive? This becomes ridiculous.
Please realize that this changed about 5 years ago. It is nothing new at all for anyone, so complaining now seems very strange to me.
If the realization does not match the specification, this means either the realization or the specification is wrong, yes? And the specification was written in 2009, less than 5 years ago.
I think you are viewing the specification in the wrong order. The spec says, if userspace sees a block device with major number 180, and any minor number, then it must be called ub* and it will be a USB device and you can talk to it in that manner. The spec also says that if you see a block device with a major number of 8 and any minor number, then it must be called sd* and it will be a SCSI device that you can talk to in that manner. The spec does NOT say that all USB devices HAVE to use major number 180. That is what I think you are confused about here. The kernel is present to provide a consistent interface to userspace so that it knows how to interact with that device. If the kernel says the device is a scsi disk device, then you can talk to it like any scsi disk device, including sending special SCSI commands to it. And that is what is happening here, Linux exports USB mass storage devices as a SCSI device to userspace, and userspace knows how to handle it just fine, as does the kernel. The dev numbering and naming is NOT to be used to detect the "real" type of device that is being controlled here in any other way than what the correct way to interact with the device. If you want to determine if this really is a USB device or not, then you need to look elsewhere in the system, not in /dev. Same goes for firewire devices (also showing up as sd*), ATA devices (also showing up as sd*) and lots of other block type devices (SD cards, docking station devices, flash chips working like a storage device, etc.) So the spec, and the kernel is correct here, what is incorrect is in how you are trying to treat the spec. You are using it for something that it was not designed for, nor does it describe in any way. Hopefully this helps clear this up, greg k-h -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org