Commit:     7c9d6f16f50d3aeb780e4f103a1ba8b35d9ae803
Parent:     74feb53e8b5020e790e12c6331cbe885d276cc60
Author:     Alan Stern <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 8 11:12:32 2007 -0500
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Fri Feb 16 11:22:55 2007 -0600

    [SCSI] SCSI core: better initialization for sdev->scsi_level
    This patch will affect the CDB in INQUIRY commands sent to LUNs above 0
    when LUN-0 reports a scsi_level of 0; the LUN bits will no longer be set
    in the second byte of the CDB.  This is as it should be.  Nevertheless,
    it's possible that some wacky device might be adversely affected.  I doubt
    anyone will complain...
    Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
 drivers/scsi/scsi_scan.c  |    1 +
 drivers/scsi/scsi_sysfs.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 7757e55..6905ffd 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -385,6 +385,7 @@ static struct scsi_target *scsi_alloc_target(struct device 
        starget->state = STARGET_RUNNING;
+       starget->scsi_level = SCSI_2;
        spin_lock_irqsave(shost->host_lock, flags);
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 259c90c..c275dca 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -922,7 +922,7 @@ void scsi_sysfs_device_initialize(struct scsi_device *sdev)
        snprintf(sdev->sdev_classdev.class_id, BUS_ID_SIZE,
                 "%d:%d:%d:%d", sdev->host->host_no,
                 sdev->channel, sdev->id, sdev->lun);
-       sdev->scsi_level = SCSI_2;
+       sdev->scsi_level = starget->scsi_level;
        spin_lock_irqsave(shost->host_lock, flags);
        list_add_tail(&sdev->same_target_siblings, &starget->devices);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to