James and Greg: Perry Wagle reports that his new USB-ESATA drives don't work properly because they don't like getting the LUN bits in the second byte of the command string. We set those bits only because usb-storage adjusts the SCSI revision level for all devices to SCSI-2; the drives themselves report a value of 0x06 (which would be SCSI-7). The reason for mangling the scsi_level value was that some USB devices reported SCSI-3 but couldn't handle some of the mandatory features: VPD pages and the REPORT LUNS command. It's now clear that instead of abusing scsi_level, we should have separate flags for the individual features we need to control. That's what this patch series does. The first merely corrects an existing typo in the definition of struct scsi_target. The second adds the new flags and makes usb-storage use them. The third takes this opportunity to do a little code clean-up in usb-storage. The changes are more or less equally divided between SCSI and usb-storage. James, if they look okay to you and you don't mind taking them through your tree, that would be fine. Or if you prefer, I'm sure Greg won't mind taking them. Although this should be quite safe, there is a small possibility that it will mess up some buggy device that has been working okay up to now. If necessary, we can always add another blacklist flag to usb-storage to treat such devices in the old way -- setting scsi_level to SCSI_2. However, because of this possibility I'm not going to send these patches to the stable tree. Alan Stern -- To unsubscribe from this list: 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