]> err.no Git - linux-2.6/commitdiff
[SCSI] sd: clearer output of disk cache state
authorLuben Tuikov <ltuikov@yahoo.com>
Wed, 15 Nov 2006 20:47:08 +0000 (12:47 -0800)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Wed, 15 Nov 2006 21:58:52 +0000 (15:58 -0600)
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/sd.c

index 152f4ff4ed7e1b531fc2f817ed7e1259ab9572ca..f6a452846fab7ba75a85c0242cdd4b4f3b881384 100644 (file)
@@ -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;
        }