2021-10-12 15:23:35

by Martin Kepplinger

[permalink] [raw]
Subject: Re: [PATCH] scsi: sd: print write through due to no caching mode page as warning

Am Freitag, dem 22.01.2021 um 09:30 +0100 schrieb Martin Kepplinger:
> For SD cardreaders it's extremely common not to find cache on disk.
> The following error messages are thus very common and don't point
> to a real error one could try to fix but rather describe how the disk
> works:
>
> sd 0:0:0:0: [sda] No Caching mode page found
> sd 0:0:0:0: [sda] Assuming drive cache: write through
>
> Print these messages as warnings instead of errors.
>
> Signed-off-by: Martin Kepplinger <[email protected]>
> ---
>  drivers/scsi/sd.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index e7c52d6df4dc..db0171c81c5b 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -2808,7 +2808,8 @@ sd_read_cache_type(struct scsi_disk *sdkp,
> unsigned char *buffer)
>                         }
>                 }
>  
> -               sd_first_printk(KERN_ERR, sdkp, "No Caching mode page
> found\n");
> +               sd_first_printk(KERN_WARNING, sdkp,
> +                               "No Caching mode page found\n");
>                 goto defaults;
>  
>         Page_found:
> @@ -2863,7 +2864,7 @@ sd_read_cache_type(struct scsi_disk *sdkp,
> unsigned char *buffer)
>                                 "Assuming drive cache: write
> back\n");
>                 sdkp->WCE = 1;
>         } else {
> -               sd_first_printk(KERN_ERR, sdkp,
> +               sd_first_printk(KERN_WARNING, sdkp,
>                                 "Assuming drive cache: write
> through\n");
>                 sdkp->WCE = 0;
>         }


hi Bart and all who it may concern,

does this "consmetic" change have any chance of being acceptible? At
least it'd be nice if messages sent as error are real errors that needs
fixing.

the patch still applies.

thank you,

martin



2021-10-12 16:31:06

by Bart Van Assche

[permalink] [raw]
Subject: Re: [PATCH] scsi: sd: print write through due to no caching mode page as warning

On 10/12/21 8:18 AM, Martin Kepplinger wrote:
> does this "consmetic" change have any chance of being acceptible? At
> least it'd be nice if messages sent as error are real errors that needs
> fixing.

Hi Martin,

It seems like I overlooked that patch. Since this patch was posted ten
months ago, it is likely that it has disappeared from the mailboxes of
the people who are interested in this patch. Please repost this patch.

Thanks,

Bart.