summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorLuben Tuikov <ltuikov@yahoo.com>2006-11-15 12:47:08 -0800
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-11-15 15:58:52 -0600
commitfd44bab5c709bbcd30fbebe9ad45a76c58cd32a7 (patch)
tree60b90f392fe4cbfb1d6022307fa50c9b55d36ffa /drivers/scsi/sd.c
parent4f777ed26086452737ea52597cf8de26137090d5 (diff)
downloadop-kernel-dev-fd44bab5c709bbcd30fbebe9ad45a76c58cd32a7.zip
op-kernel-dev-fd44bab5c709bbcd30fbebe9ad45a76c58cd32a7.tar.gz
[SCSI] sd: clearer output of disk cache state
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 152f4ff..f6a4528 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1467,7 +1467,6 @@ sd_read_cache_type(struct scsi_disk *sdkp, char *diskname,
res = sd_do_mode_sense(sdp, dbd, modepage, buffer, len, &data, &sshdr);
if (scsi_status_is_good(res)) {
- int ct = 0;
int offset = data.header_length + data.block_descriptor_length;
if (offset >= SD_BUF_SIZE - 2) {
@@ -1496,11 +1495,13 @@ sd_read_cache_type(struct scsi_disk *sdkp, char *diskname,
sdkp->DPOFUA = 0;
}
- ct = sdkp->RCD + 2*sdkp->WCE;
-
- printk(KERN_NOTICE "SCSI device %s: drive cache: %s%s\n",
- diskname, sd_cache_types[ct],
- sdkp->DPOFUA ? " w/ FUA" : "");
+ printk(KERN_NOTICE "SCSI device %s: "
+ "write cache: %s, read cache: %s, %s\n",
+ diskname,
+ sdkp->WCE ? "enabled" : "disabled",
+ sdkp->RCD ? "disabled" : "enabled",
+ sdkp->DPOFUA ? "supports DPO and FUA"
+ : "doesn't support DPO or FUA");
return;
}
OpenPOWER on IntegriCloud