On 2019-10-18 03:01, zhengbin wrote:
> @@ -1648,16 +1651,20 @@ static int sd_sync_cache(struct scsi_disk *sdkp, 
> struct scsi_sense_hdr *sshdr)
>       if (res) {
>               sd_print_result(sdkp, "Synchronize Cache(10) failed", res);
> 
> -             if (driver_byte(res) == DRIVER_SENSE)
> +             /* we need to evaluate the error return  */
> +             if (driver_byte(res) == DRIVER_SENSE &&
> +                 scsi_sense_valid(sshdr)) {
>                       sd_print_sense_hdr(sdkp, sshdr);
> 

Does Hannes' comment about DRIVER_SENSE also apply to this patch?

Thanks,

Bart.

Reply via email to