diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 16:32:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 16:32:28 -0500 |
commit | 5fc77247f7db01b6377a5ea6ab18c8ac60021045 (patch) | |
tree | d9f33f0e01b64a46ade3f45a3553b1a8ba8fc5b5 /drivers/scsi/scsi_scan.c | |
parent | d43a338e395371733a80ec473b40baac5f74d768 (diff) | |
parent | 7c9d6f16f50d3aeb780e4f103a1ba8b35d9ae803 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6:
[SCSI] SCSI core: better initialization for sdev->scsi_level
[SCSI] scsi_proc.c: display sdev->scsi_level correctly
[SCSI] megaraid_sas: update version and author info
[SCSI] megaraid_sas: return sync cache call with success
[SCSI] megaraid_sas: replace pci_alloc_consitent with dma_alloc_coherent in ioctl path
[SCSI] megaraid_sas: add bios_param in scsi_host_template
[SCSI] megaraid_sas: do not process cmds if hw_crit_error is set
[SCSI] scsi_transport.h should include scsi_device.h
[SCSI] aic79xx: remove extra newline from info message
[SCSI] scsi_scan.c: handle bad inquiry responses
[SCSI] aic94xx: tie driver to the major number of the sequencer firmware
[SCSI] lpfc: add PCI error recovery support
[SCSI] megaraid: pci_module_init to pci_register_driver
[SCSI] tgt: fix the user/kernel ring buffer interface
[SCSI] sgiwd93: interfacing to wd33c93
[SCSI] wd33c93: Fast SCSI with WD33C93B
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
-rw-r--r-- | drivers/scsi/scsi_scan.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index d6fe756eb371..0949145304ea 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 *parent, | |||
385 | INIT_LIST_HEAD(&starget->siblings); | 385 | INIT_LIST_HEAD(&starget->siblings); |
386 | INIT_LIST_HEAD(&starget->devices); | 386 | INIT_LIST_HEAD(&starget->devices); |
387 | starget->state = STARGET_RUNNING; | 387 | starget->state = STARGET_RUNNING; |
388 | starget->scsi_level = SCSI_2; | ||
388 | retry: | 389 | retry: |
389 | spin_lock_irqsave(shost->host_lock, flags); | 390 | spin_lock_irqsave(shost->host_lock, flags); |
390 | 391 | ||
@@ -654,6 +655,19 @@ static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result, | |||
654 | * short INQUIRY), an abort here prevents any further use of the | 655 | * short INQUIRY), an abort here prevents any further use of the |
655 | * device, including spin up. | 656 | * device, including spin up. |
656 | * | 657 | * |
658 | * On the whole, the best approach seems to be to assume the first | ||
659 | * 36 bytes are valid no matter what the device says. That's | ||
660 | * better than copying < 36 bytes to the inquiry-result buffer | ||
661 | * and displaying garbage for the Vendor, Product, or Revision | ||
662 | * strings. | ||
663 | */ | ||
664 | if (sdev->inquiry_len < 36) { | ||
665 | printk(KERN_INFO "scsi scan: INQUIRY result too short (%d)," | ||
666 | " using 36\n", sdev->inquiry_len); | ||
667 | sdev->inquiry_len = 36; | ||
668 | } | ||
669 | |||
670 | /* | ||
657 | * Related to the above issue: | 671 | * Related to the above issue: |
658 | * | 672 | * |
659 | * XXX Devices (disk or all?) should be sent a TEST UNIT READY, | 673 | * XXX Devices (disk or all?) should be sent a TEST UNIT READY, |