[SRU][Wily][Xenial][PATCH 2/2] UBUNTU: SAUCE: (no-up) scsi: storvsc: Filter out storvsc messages CD-ROM medium not present

Joseph Salisbury joseph.salisbury at canonical.com
Wed Jul 6 20:03:49 UTC 2016


On 07/04/2016 12:32 PM, Andy Whitcroft wrote:
> On Fri, Jul 01, 2016 at 09:44:14PM -0400, Joseph Salisbury wrote:
>> From: Cathy Avery <cavery at redhat.com>
>>
>> BugLink: http://bugs.launchpad.net/bugs/1590655
>>
>> Signed-off-by: Joseph Salisbury <joseph.salisbury at canonical.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 95462c5..9948745 100644
>> --- a/drivers/scsi/storvsc_drv.c
>> +++ b/drivers/scsi/storvsc_drv.c
>> @@ -963,7 +963,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);
> Do we really need that foundation patch.  This appears to just add a
> couple of additional clauses to this if which would apply with wiggling
> pretty directly to the original code?
>
> -apw
I took another look at this patch set.  It looks like we do actually
need some of the first prereq patch.  It defines some constants and the
do_logging function:


+#define STORVSC_LOGGING_ERROR  1
 
AND

+static inline bool do_logging(int level)
+{
+       return logging_level >= level;
+}


Without these definitions, there will be build failures:


/home/jsalisbury/bugs/lp1590655/ubuntu-xenial/drivers/scsi/storvsc_drv.c: In
function 'storvsc_command_completion':
/home/jsalisbury/bugs/lp1590655/ubuntu-xenial/drivers/scsi/storvsc_drv.c:948:7:
error: implicit declaration of function 'do_logging'
[-Werror=implicit-function-declaration]
       do_logging(STORVSC_LOGGING_ERROR))
       ^
/home/jsalisbury/bugs/lp1590655/ubuntu-xenial/drivers/scsi/storvsc_drv.c:948:18:
error: 'STORVSC_LOGGING_ERROR' undeclared (first use in this function)
       do_logging(STORVSC_LOGGING_ERROR))
                  ^
/home/jsalisbury/bugs/lp1590655/ubuntu-xenial/drivers/scsi/storvsc_drv.c:948:18:
note: each undeclared identifier is reported only once for each function
it appears in
/home/jsalisbury/bugs/lp1590655/ubuntu-xenial/drivers/scsi/storvsc_drv.c:948:40:
error: expected ';' before ')' token
       do_logging(STORVSC_LOGGING_ERROR))




I can move these declarations into a single backport of the new SAUCE
patch, or we can keep them separate by applying mainline commit
f8aea701b as a prereq.  Which way would you prefer?

Thanks,

Joe













More information about the kernel-team mailing list