linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: sd: print write through due to no caching mode page as warning
@ 2021-10-13  7:50 Martin Kepplinger
  2021-10-14  4:18 ` Bart Van Assche
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Martin Kepplinger @ 2021-10-13  7:50 UTC (permalink / raw)
  To: martin.kepplinger
  Cc: bvanassche, dgilbert, jejb, linux-kernel, linux-scsi, martin.petersen

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 <martin.kepplinger@puri.sm>
---

hi Bart and all who it may concern,

I only resending the same patch I sent in January before:
https://lore.kernel.org/linux-scsi/20210122083000.32598-1-martin.kepplinger@puri.sm/

I like it more when messages printed as errors point to real problems that
need fixing.

thanks,
                         martin




 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 a646d27df681..33ea36b41136 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2793,7 +2793,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:
@@ -2848,7 +2849,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;
 	}
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] scsi: sd: print write through due to no caching mode page as warning
  2021-10-13  7:50 [PATCH] scsi: sd: print write through due to no caching mode page as warning Martin Kepplinger
@ 2021-10-14  4:18 ` Bart Van Assche
  2021-10-17  2:09 ` Martin K. Petersen
  2021-10-21  3:42 ` Martin K. Petersen
  2 siblings, 0 replies; 7+ messages in thread
From: Bart Van Assche @ 2021-10-14  4:18 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: dgilbert, jejb, linux-kernel, linux-scsi, martin.petersen

On 10/13/21 00:50, Martin Kepplinger wrote:
> I only resending the same patch I sent in January before:
> https://lore.kernel.org/linux-scsi/20210122083000.32598-1-martin.kepplinger@puri.sm/

A common way to indicate this is to start the email subject with [PATCH 
RESEND].

> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index a646d27df681..33ea36b41136 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -2793,7 +2793,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:
> @@ -2848,7 +2849,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;
>   	}

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] scsi: sd: print write through due to no caching mode page as warning
  2021-10-13  7:50 [PATCH] scsi: sd: print write through due to no caching mode page as warning Martin Kepplinger
  2021-10-14  4:18 ` Bart Van Assche
@ 2021-10-17  2:09 ` Martin K. Petersen
  2021-10-21  3:42 ` Martin K. Petersen
  2 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2021-10-17  2:09 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: bvanassche, dgilbert, jejb, linux-kernel, linux-scsi, martin.petersen


Martin,

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

Applied to 5.16/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] scsi: sd: print write through due to no caching mode page as warning
  2021-10-13  7:50 [PATCH] scsi: sd: print write through due to no caching mode page as warning Martin Kepplinger
  2021-10-14  4:18 ` Bart Van Assche
  2021-10-17  2:09 ` Martin K. Petersen
@ 2021-10-21  3:42 ` Martin K. Petersen
  2 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2021-10-21  3:42 UTC (permalink / raw)
  To: Martin Kepplinger
  Cc: Martin K . Petersen, jejb, bvanassche, dgilbert, linux-scsi,
	linux-kernel

On Wed, 13 Oct 2021 09:50:50 +0200, Martin Kepplinger wrote:

> 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
> 
> [...]

Applied to 5.16/scsi-queue, thanks!

[1/1] scsi: sd: print write through due to no caching mode page as warning
      https://git.kernel.org/mkp/scsi/c/c4da1205752d

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] scsi: sd: print write through due to no caching mode page as warning
  2021-10-12 15:18 ` Martin Kepplinger
@ 2021-10-12 16:28   ` Bart Van Assche
  0 siblings, 0 replies; 7+ messages in thread
From: Bart Van Assche @ 2021-10-12 16:28 UTC (permalink / raw)
  To: Martin Kepplinger, jejb, martin.petersen
  Cc: dgilbert, linux-scsi, linux-kernel

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] scsi: sd: print write through due to no caching mode page as warning
  2021-01-22  8:30 Martin Kepplinger
@ 2021-10-12 15:18 ` Martin Kepplinger
  2021-10-12 16:28   ` Bart Van Assche
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Kepplinger @ 2021-10-12 15:18 UTC (permalink / raw)
  To: jejb, martin.petersen; +Cc: dgilbert, bvanassche, linux-scsi, linux-kernel

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 <martin.kepplinger@puri.sm>
> ---
>  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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] scsi: sd: print write through due to no caching mode page as warning
@ 2021-01-22  8:30 Martin Kepplinger
  2021-10-12 15:18 ` Martin Kepplinger
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Kepplinger @ 2021-01-22  8:30 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: dgilbert, bvanassche, linux-scsi, linux-kernel, 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 <martin.kepplinger@puri.sm>
---
 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;
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-21  3:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13  7:50 [PATCH] scsi: sd: print write through due to no caching mode page as warning Martin Kepplinger
2021-10-14  4:18 ` Bart Van Assche
2021-10-17  2:09 ` Martin K. Petersen
2021-10-21  3:42 ` Martin K. Petersen
  -- strict thread matches above, loose matches on Subject: below --
2021-01-22  8:30 Martin Kepplinger
2021-10-12 15:18 ` Martin Kepplinger
2021-10-12 16:28   ` Bart Van Assche

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