Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3207654pxb; Wed, 13 Oct 2021 00:56:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBWl75cjg2V9xIirfLt3gcBqMP4+tL/SVmhESvzJlgFly4xYHT43qtP6yyskFrToB8dQdJ X-Received: by 2002:a17:906:3ac6:: with SMTP id z6mr21765726ejd.196.1634111772849; Wed, 13 Oct 2021 00:56:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634111772; cv=none; d=google.com; s=arc-20160816; b=MvQFO9IlKZ3rFFhc99leEMKb2EXgAdQhqsTNmxxyT4IU08WadYpIJzOCJZwAkQHGTz dts4AKTUXnxq3t+iTg9RhDuJ4udSLnjCIJJEfdA6ObpL98HixMGTNJVCe10MM9kuAo96 TkBPjiT6boPJGLKApKOfuAFcxrMHsVvk+pk89dN+YcoVZejUwiKTiVk6SEI07bPUCtYh 7dhGtoQHgVYjBJphDuvx6nY+aYhN523BqZDnP/q01GPD1hINck+6qHdVQTJjljfBDjyM 2Cg+yHMBYYKXlc2osGo/n+nL9V8qM8vgcJTrIRFLokgaYW/yMaqOafB5hQtuWo5hE3WX fyuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=lNjvhfnNvZk9ezv6AK3LzfLZN+PYK0xarbqe/EIn/TM=; b=oCIelm+ey5i8W8BEcWebaICP1SGi3b0veK5cKFfNPI1fXtH0DIxaJM+Lgo9CX/pdgS BDjvbEU1ozq8NiGhiRadciqbvQ1PQoNqGbGsKx9lCFHsOhxrre/v3/yvMaJdipKUN+CU gmeQqTVv4pfd7rZW8Nvok9TP+ZTJb4rQmVHfYEfmAKaQvfLxvqIlSzeB6Mhf2ymiUNPx FxSOypklH7Yzt7LBxwajhzZQBY7qidSXQYIx/lx2Uhllsw4qoGapSi/5gfi5clYDUzAt nyeIjO5GGy6P7Q2LYa1y6cOwzYljSuYHYI0U9gc3MIkVhKT9xq11mf2Vp3fkvut42HzF e3gg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b14si17981239ejv.295.2021.10.13.00.55.49; Wed, 13 Oct 2021 00:56:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238597AbhJMHxm (ORCPT + 99 others); Wed, 13 Oct 2021 03:53:42 -0400 Received: from comms.puri.sm ([159.203.221.185]:47924 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238733AbhJMHxh (ORCPT ); Wed, 13 Oct 2021 03:53:37 -0400 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 1A652DFAC1; Wed, 13 Oct 2021 00:51:04 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id evIA57ZQRvWE; Wed, 13 Oct 2021 00:51:03 -0700 (PDT) From: Martin Kepplinger To: martin.kepplinger@puri.sm Cc: bvanassche@acm.org, dgilbert@interlog.com, jejb@linux.ibm.com, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, martin.petersen@oracle.com Subject: [PATCH] scsi: sd: print write through due to no caching mode page as warning Date: Wed, 13 Oct 2021 09:50:50 +0200 Message-Id: <20211013075050.3870354-1-martin.kepplinger@puri.sm> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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