* [PATCH 1/1] scsi: storvsc: Filter out storvsc messages CD-ROM medium not present
@ 2016-05-23 14:29 Cathy Avery
2016-06-03 21:34 ` KY Srinivasan
2016-06-04 14:33 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Cathy Avery @ 2016-05-23 14:29 UTC (permalink / raw)
To: linux-scsi; +Cc: kys, haiyangz, martin.petersen, jejb, devel, linux-kernel
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
Signed-off-by: Cathy Avery <cavery@redhat.com>
---
drivers/scsi/storvsc_drv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 3ddcabb..f0efa07 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH 1/1] scsi: storvsc: Filter out storvsc messages CD-ROM medium not present
2016-05-23 14:29 [PATCH 1/1] scsi: storvsc: Filter out storvsc messages CD-ROM medium not present Cathy Avery
@ 2016-06-03 21:34 ` KY Srinivasan
2016-06-04 14:33 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: KY Srinivasan @ 2016-06-03 21:34 UTC (permalink / raw)
To: Cathy Avery, linux-scsi
Cc: Haiyang Zhang, martin.petersen, jejb, devel, linux-kernel
> -----Original Message-----
> From: Cathy Avery [mailto:cavery@redhat.com]
> Sent: Monday, May 23, 2016 7:29 AM
> To: linux-scsi@vger.kernel.org
> Cc: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; martin.petersen@oracle.com;
> jejb@linux.vnet.ibm.com; devel@linuxdriverproject.org; linux-
> kernel@vger.kernel.org
> Subject: [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
>
> Signed-off-by: Cathy Avery <cavery@redhat.com>
Thanks Cathy.
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
> ---
> drivers/scsi/storvsc_drv.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index 3ddcabb..f0efa07 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] scsi: storvsc: Filter out storvsc messages CD-ROM medium not present
2016-05-23 14:29 [PATCH 1/1] scsi: storvsc: Filter out storvsc messages CD-ROM medium not present Cathy Avery
2016-06-03 21:34 ` KY Srinivasan
@ 2016-06-04 14:33 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2016-06-04 14:33 UTC (permalink / raw)
To: Cathy Avery
Cc: linux-scsi, kys, haiyangz, martin.petersen, jejb, devel, linux-kernel
>>>>> "Cathy" == Cathy Avery <cavery@redhat.com> 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.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-04 14:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-23 14:29 [PATCH 1/1] scsi: storvsc: Filter out storvsc messages CD-ROM medium not present Cathy Avery
2016-06-03 21:34 ` KY Srinivasan
2016-06-04 14:33 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).