Skip to contentSkip to conversation

sd: Lower printk level for drive cache information

PATCH In review Josh Boyer 2 participants 3 messages Nov 28, 2011 – Nov 29, 2011 SCSI

lore
Share & tools
lore

Josh Boyer

author
#0 lore raw

PATCH 1/1 sd: Lower printk level for drive cache information

Numerous devices don't present cache data, particularly USB sticks. The devices operate correctly despite this, so lower the printk severity to KERN_NOTICE.

---

drivers/scsi/sd.c +2 -2
index fa3a591..7cf9ec5 100644
@@ -2119,7 +2119,7 @@ sd_read_cache_type(struct scsi_disk *sdkp, unsigned char *buffer)
 		}
 
 		if (modepage == 0x3F) {
-			sd_printk(KERN_ERR, sdkp, "No Caching mode page "
+			sd_printk(KERN_NOTICE, sdkp, "No Caching mode page "
 				  "present\n");
 			goto defaults;
 		} else if ((buffer[offset] & 0x3f) != modepage) {
@@ -2164,7 +2164,7 @@ bad_sense:
 		sd_printk(KERN_ERR, sdkp, "Asking for cache data failed\n");
 
 defaults:
-	sd_printk(KERN_ERR, sdkp, "Assuming drive cache: write through\n");
+	sd_printk(KERN_NOTICE, sdkp, "Assuming drive cache: write through\n");
 	sdkp->WCE = 0;
 	sdkp->RCD = 0;
 	sdkp->DPOFUA = 0;
#1 lore raw
Quoted 3 lines · Josh Boyer

Numerous devices don't present cache data, particularly USB sticks. The devices operate correctly despite this, so lower the printk severity to KERN_NOTICE.

Do they? The last reports on the list were for devices that didn't present it but actually needed cache flushes despite not having the cache mode page.

author
#2 lore raw
Quoted 8 lines · Christoph Hellwig
Quoted 3 lines · Josh Boyer

Numerous devices don't present cache data, particularly USB sticks. The devices operate correctly despite this, so lower the printk severity to KERN_NOTICE.

Do they? The last reports on the list were for devices that didn't present it but actually needed cache flushes despite not having the cache mode page.

We've seen a number of reports for liveusb images that spit out those printks, but seem to otherwise work fine.

Even if the devices need cache flushes, what is a typical user supposed to do about that? I'm not particularly tied to this patch, but there is nothing a normal user can do with the information spit out by these printks, so making it KERN_ERR seems excessive.

josh

Quoted 1 line