Skip to contentSkip to conversation

scsi: storvsc: Filter out storvsc messages CD-ROM medium not present

PATCH In review Cathy Avery 3 participants 3 messages May 23, 2016 – Jun 4, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: storvsc: Filter out storvsc messages CD-ROM medium not present

When a virtual scsi DVD device is present with no image file attached the storvsc driver logs all resulting unnecessary sense errors whenever IO is issued to the device.

[storvsc] Sense Key : Not Ready [current] [storvsc] Add. Sense: Medium not present - tray closed

---
 drivers/scsi/storvsc_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/storvsc_drv.c +3 -1
index 3ddcabb..f0efa07 100644
@@ -966,7 +966,9 @@ static void storvsc_command_completion(struct storvsc_cmd_request *cmd_request,
 	if (scmnd->result) {
 		if (scsi_normalize_sense(scmnd->sense_buffer,
 				SCSI_SENSE_BUFFERSIZE, &sense_hdr) &&
-		    do_logging(STORVSC_LOGGING_ERROR))
+		    !(sense_hdr.sense_key == NOT_READY &&
+				 sense_hdr.asc == 0x03A) &&
+		    do_logging(STORVSC_LOGGING_ERROR)) 
 			scsi_print_sense_hdr(scmnd->device, "storvsc",
 					     &sense_hdr);
 	}
Signature · 1 line
2.5.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines

-----Original Message-----
From: Cathy Avery [mailto:[email protected]]
Sent: Monday, May 23, 2016 7:29 AM
To: [email protected]
Cc: KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; [email protected]; [email protected]; [email protected]; linux- [email protected]
Subject: [PATCH 1/1] scsi: storvsc: Filter out storvsc messages CD-ROM medium not present

Quoted 8 lines

When a virtual scsi DVD device is present with no image file attached the storvsc driver logs all resulting unnecessary sense errors whenever IO is issued to the device.

[storvsc] Sense Key : Not Ready [current] [storvsc] Add. Sense: Medium not present - tray closed

Thanks Cathy.

Quoted 22 lines
---
 drivers/scsi/storvsc_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/storvsc_drv.c +3 -1
index 3ddcabb..f0efa07 100644
@@ -966,7 +966,9 @@ static void storvsc_command_completion(struct
 storvsc_cmd_request *cmd_request,
 	if (scmnd->result) {
 		if (scsi_normalize_sense(scmnd->sense_buffer,
 				SCSI_SENSE_BUFFERSIZE, &sense_hdr) &&
-		    do_logging(STORVSC_LOGGING_ERROR))
+		    !(sense_hdr.sense_key == NOT_READY &&
+				 sense_hdr.asc == 0x03A) &&
+		    do_logging(STORVSC_LOGGING_ERROR))
 			scsi_print_sense_hdr(scmnd->device, "storvsc",
 					     &sense_hdr);

}
--
2.5.0

#2 lore raw
In reply to Cathy Avery
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Cathy" == Cathy Avery <[email protected]> writes:

Cathy> When a virtual scsi DVD device is present with no image file Cathy> attached the storvsc driver logs all resulting unnecessary sense Cathy> errors whenever IO is issued to the device.

Tweaked whitespace and applied to 4.8/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering