diff options
author | Cathy Avery <cavery@redhat.com> | 2016-05-23 16:29:17 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-07-13 05:16:31 +0200 |
commit | 84b342c0f4dc0180ad4ac701b46024761ff4af11 (patch) | |
tree | f7713e6bcb21818081bccaf47cd416a007abad68 /drivers/scsi/storvsc_drv.c | |
parent | bnx2fc: replace printk() with BNX2FC_IO_DBG() (diff) | |
download | linux-84b342c0f4dc0180ad4ac701b46024761ff4af11.tar.xz linux-84b342c0f4dc0180ad4ac701b46024761ff4af11.zip |
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: Cathy Avery <cavery@redhat.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/storvsc_drv.c')
-rw-r--r-- | drivers/scsi/storvsc_drv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 3ddcabb790a8..8ccfc9ea874b 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -966,6 +966,8 @@ 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) && + !(sense_hdr.sense_key == NOT_READY && + sense_hdr.asc == 0x03A) && do_logging(STORVSC_LOGGING_ERROR)) scsi_print_sense_hdr(scmnd->device, "storvsc", &sense_hdr); |