diff options
| author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-05 19:09:46 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-05 19:09:46 -0500 |
| commit | ec0bf39a471bf6fcd01def2bd677128cea940b73 (patch) | |
| tree | 0d98b304d97605613a14329b40ed8cbb88296528 /drivers/scsi/sd.c | |
| parent | bf83c2a315637dee8a8b5c2221ce5030cc38c6db (diff) | |
| parent | d32adcb85c74fd81963714689842993e7014515f (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: (73 commits)
[SCSI] aic79xx: Add ASC-29320LPE ids to driver
[SCSI] stex: version update
[SCSI] stex: change wait loop code
[SCSI] stex: add new device type support
[SCSI] stex: update device id info
[SCSI] stex: adjust default queue length
[SCSI] stex: add value check in hard reset routine
[SCSI] stex: fix controller_info command handling
[SCSI] stex: fix biosparam calculation
[SCSI] megaraid: fix MMIO casts
[SCSI] tgt: fix undefined flush_dcache_page() problem
[SCSI] libsas: better error handling in sas_expander.c
[SCSI] lpfc 8.1.11 : Change version number to 8.1.11
[SCSI] lpfc 8.1.11 : Misc Fixes
[SCSI] lpfc 8.1.11 : Add soft_wwnn sysfs attribute, rename soft_wwn_enable
[SCSI] lpfc 8.1.11 : Removed decoding of PCI Subsystem Id
[SCSI] lpfc 8.1.11 : Add MSI (Message Signalled Interrupts) support
[SCSI] lpfc 8.1.11 : Adjust LOG_FCP logging
[SCSI] lpfc 8.1.11 : Fix Memory leaks
[SCSI] lpfc 8.1.11 : Fix lpfc_multi_ring_support
...
Diffstat (limited to 'drivers/scsi/sd.c')
| -rw-r--r-- | drivers/scsi/sd.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 84ff203ffedd..f6a452846fab 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
| @@ -1051,6 +1051,14 @@ sd_spinup_disk(struct scsi_disk *sdkp, char *diskname) | |||
| 1051 | &sshdr, SD_TIMEOUT, | 1051 | &sshdr, SD_TIMEOUT, |
| 1052 | SD_MAX_RETRIES); | 1052 | SD_MAX_RETRIES); |
| 1053 | 1053 | ||
| 1054 | /* | ||
| 1055 | * If the drive has indicated to us that it | ||
| 1056 | * doesn't have any media in it, don't bother | ||
| 1057 | * with any more polling. | ||
| 1058 | */ | ||
| 1059 | if (media_not_present(sdkp, &sshdr)) | ||
| 1060 | return; | ||
| 1061 | |||
| 1054 | if (the_result) | 1062 | if (the_result) |
| 1055 | sense_valid = scsi_sense_valid(&sshdr); | 1063 | sense_valid = scsi_sense_valid(&sshdr); |
| 1056 | retries++; | 1064 | retries++; |
| @@ -1059,14 +1067,6 @@ sd_spinup_disk(struct scsi_disk *sdkp, char *diskname) | |||
| 1059 | ((driver_byte(the_result) & DRIVER_SENSE) && | 1067 | ((driver_byte(the_result) & DRIVER_SENSE) && |
| 1060 | sense_valid && sshdr.sense_key == UNIT_ATTENTION))); | 1068 | sense_valid && sshdr.sense_key == UNIT_ATTENTION))); |
| 1061 | 1069 | ||
| 1062 | /* | ||
| 1063 | * If the drive has indicated to us that it doesn't have | ||
| 1064 | * any media in it, don't bother with any of the rest of | ||
| 1065 | * this crap. | ||
| 1066 | */ | ||
| 1067 | if (media_not_present(sdkp, &sshdr)) | ||
| 1068 | return; | ||
| 1069 | |||
| 1070 | if ((driver_byte(the_result) & DRIVER_SENSE) == 0) { | 1070 | if ((driver_byte(the_result) & DRIVER_SENSE) == 0) { |
| 1071 | /* no sense, TUR either succeeded or failed | 1071 | /* no sense, TUR either succeeded or failed |
| 1072 | * with a status error */ | 1072 | * with a status error */ |
| @@ -1467,7 +1467,6 @@ sd_read_cache_type(struct scsi_disk *sdkp, char *diskname, | |||
| 1467 | res = sd_do_mode_sense(sdp, dbd, modepage, buffer, len, &data, &sshdr); | 1467 | res = sd_do_mode_sense(sdp, dbd, modepage, buffer, len, &data, &sshdr); |
| 1468 | 1468 | ||
| 1469 | if (scsi_status_is_good(res)) { | 1469 | if (scsi_status_is_good(res)) { |
| 1470 | int ct = 0; | ||
| 1471 | int offset = data.header_length + data.block_descriptor_length; | 1470 | int offset = data.header_length + data.block_descriptor_length; |
| 1472 | 1471 | ||
| 1473 | if (offset >= SD_BUF_SIZE - 2) { | 1472 | if (offset >= SD_BUF_SIZE - 2) { |
| @@ -1496,11 +1495,13 @@ sd_read_cache_type(struct scsi_disk *sdkp, char *diskname, | |||
| 1496 | sdkp->DPOFUA = 0; | 1495 | sdkp->DPOFUA = 0; |
| 1497 | } | 1496 | } |
| 1498 | 1497 | ||
| 1499 | ct = sdkp->RCD + 2*sdkp->WCE; | 1498 | printk(KERN_NOTICE "SCSI device %s: " |
| 1500 | 1499 | "write cache: %s, read cache: %s, %s\n", | |
| 1501 | printk(KERN_NOTICE "SCSI device %s: drive cache: %s%s\n", | 1500 | diskname, |
| 1502 | diskname, sd_cache_types[ct], | 1501 | sdkp->WCE ? "enabled" : "disabled", |
| 1503 | sdkp->DPOFUA ? " w/ FUA" : ""); | 1502 | sdkp->RCD ? "disabled" : "enabled", |
| 1503 | sdkp->DPOFUA ? "supports DPO and FUA" | ||
| 1504 | : "doesn't support DPO or FUA"); | ||
| 1504 | 1505 | ||
| 1505 | return; | 1506 | return; |
| 1506 | } | 1507 | } |
