On Fri, 2005-12-23 at 12:41 -0500, Jeff Garzik wrote: > James Bottomley wrote: > > 1) Simply don't mangle the LUN for SCSI_UNKNOWN and then have all the > > subsystems lying about SCSI_2 compliance instead set their mangled level > > to SCSI_UNKNOWN (which seems to be more truthful) > > It is specified in MMC that ATAPI or USB may be SCSI level to zero. > Thus "lying" is not really accurate at all. We need to update SCSI to > handle these devices as specified. Isn't that what I proposed? But it only fixes the devices whose SCSI level is correctly passed on to the mid-layer. There's still the problem of USB and other subsystems mangling the level back to SCSI_2 which causes the LUN to be placed in cdb[1] as per spec. > This is why I snoop INQUIRY for ATAPI devices in libata-scsi, and force > the SCSI version to 0x05, if SCSI version is returned from the device as > zero. It is conditional because -- due to the wonderful world of > hardware -- some ATAPI devices (such as SCSI devices plugged into an > SPI<->ATA bridge) and some USB devices correctly report SCSI version. Well, that's SCSI3 (SPC-3), which is fine, but does mean we try REPORT_LUNS scanning. The problem in other subsystems is that some devices hang when they see a REPORT_LUNS command. What problems do you see returning zero (apart from cdb[1] changes)? James - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html