Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84b342c0 authored by Cathy Avery's avatar Cathy Avery Committed by Martin K. Petersen
Browse files

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

[mkp: Fixed whitespace]

Signed-off-by: default avatarCathy Avery <cavery@redhat.com>
Reviewed-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 8a30a3c7
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -966,6 +966,8 @@ static void storvsc_command_completion(struct storvsc_cmd_request *cmd_request,
	if (scmnd->result) {
	if (scmnd->result) {
		if (scsi_normalize_sense(scmnd->sense_buffer,
		if (scsi_normalize_sense(scmnd->sense_buffer,
				SCSI_SENSE_BUFFERSIZE, &sense_hdr) &&
				SCSI_SENSE_BUFFERSIZE, &sense_hdr) &&
		    !(sense_hdr.sense_key == NOT_READY &&
				 sense_hdr.asc == 0x03A) &&
		    do_logging(STORVSC_LOGGING_ERROR))
		    do_logging(STORVSC_LOGGING_ERROR))
			scsi_print_sense_hdr(scmnd->device, "storvsc",
			scsi_print_sense_hdr(scmnd->device, "storvsc",
					     &sense_hdr);
					     &sense_hdr);