On Sun, 22 Jul 2007 18:42:14 +0800 jidong xiao wrote: > Any one can kindly explain this? > > Thanks > Jason Xiao > > On 7/21/07, jidong xiao <jidong.xiao@xxxxxxxxx> wrote: > > I noticed that there is a char scsi_level in the struct scsi_device, > > what does scsi_level mean? > > > > struct scsi_device { > > ... > > char scsi_level; > > ... > > } Does this help? It's explained in include/scsi/scsi.h as: /* * struct scsi_device::scsi_level values. For SCSI devices other than those * prior to SCSI-2 (i.e. over 12 years old) this value is (resp[2] + 1) * where "resp" is a byte array of the response to an INQUIRY. The scsi_level * variable is visible to the user via sysfs. */ #define SCSI_UNKNOWN 0 #define SCSI_1 1 #define SCSI_1_CCS 2 #define SCSI_2 3 #define SCSI_3 4 /* SPC */ #define SCSI_SPC_2 5 #define SCSI_SPC_3 6 > > Is it SCSI revision? > > If the answer is true, then I am quite curious, from the code I have > > read, SCSI_2 is something special, see following function: > > picked up from drivers/scsi/scsi_sysfs.c: > > int scsi_sysfs_target_initialize(struct scsi_device *sdev){ > > /* > > * If there wasn't another lun already configured at > > * this target, then default this device to SCSI_2 > > * until we know better > > */ > > sdev->scsi_level = SCSI_2; > > } > > > > Why SCSI_2 could be the default value, why not SCSI_1, why not SCSI_3, > > and etc.Seems SCSI_2 is distinguished from other levels,any reason for > > this? > > > > Thanks > > Jason Xiao --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** - 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