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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Cathy Avery [mailto:cavery@xxxxxxxxxx]
> Sent: Monday, May 23, 2016 7:29 AM
> To: linux-scsi@xxxxxxxxxxxxxxx
> Cc: KY Srinivasan <kys@xxxxxxxxxxxxx>; Haiyang Zhang
> <haiyangz@xxxxxxxxxxxxx>; martin.petersen@xxxxxxxxxx;
> jejb@xxxxxxxxxxxxxxxxxx; devel@xxxxxxxxxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> 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@xxxxxxxxxx>

Thanks Cathy.

Reviewed-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>

> ---
>  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

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux