From patchwork Thu Dec 21 20:50:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Cline X-Patchwork-Id: 10128389 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 589256019C for ; Thu, 21 Dec 2017 20:50:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B53629C8A for ; Thu, 21 Dec 2017 20:50:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DE4F29E11; Thu, 21 Dec 2017 20:50:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FE6329E11 for ; Thu, 21 Dec 2017 20:50:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755507AbdLUUuH (ORCPT ); Thu, 21 Dec 2017 15:50:07 -0500 Received: from a8-200.smtp-out.amazonses.com ([54.240.8.200]:37772 "EHLO a8-200.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753178AbdLUUuG (ORCPT ); Thu, 21 Dec 2017 15:50:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=rdybrs3533vx7mghocfwl3vdwgpl2v5u; d=jcline.org; t=1513889405; h=From:To:Cc:Subject:Date:Message-Id; bh=3ajsGJuoHLlCDe5Lfo2YyEevCxYC3d1+glWCKjBXeME=; b=WzQMqzqwXV4dCWun356lVRMDMY0KwOCNrbWM+KAhYyc+JUOYwOfY0aP21+aCQU9s nzylnVSBnCayXfi+2YMm7HIMougUN7bc3JuZWJi3hM0yQzH565wONm7gN0hhm/A/Unz ifSATMGCmta833Y+ZsvcQEJIShuIfNbWktPxLXOY= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1513889405; h=From:To:Cc:Subject:Date:Message-Id:Feedback-ID; bh=3ajsGJuoHLlCDe5Lfo2YyEevCxYC3d1+glWCKjBXeME=; b=L11ToJjrWoxn9ZYDAR5jKB4cd7V1GGI6M9hnhzswhyhZP1Evp4lHg2XW2f6sNC6F ZLPmBub/wWAouhPPacBZN4L4+hq/xMHA5M3Y9AgRCbThVnqfYiX0fkFTHEc6MMd4v5J Nl4j9pzKfPVpFb/tEF7uBoOS9F+TbKWFr3BgTGS8= X-Virus-Scanned: amavisd-new at jcline.org From: Jeremy Cline To: "James E . J . Bottomley" , "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Jeremy Cline Subject: [PATCH] scsi: sd: Use warn for logs about no caching info Date: Thu, 21 Dec 2017 20:50:05 +0000 Message-ID: <010001607ad7197e-2f933a99-5ecd-4245-acd8-acfe3e3bdf9a-000000@email.amazonses.com> X-Mailer: git-send-email 2.14.3 X-SES-Outgoing: 2017.12.21-54.240.8.200 Feedback-ID: 1.us-east-1.z18Isoc/FaoPOvCyJyi1mnTt8STwoRuibXVNoUcvG6g=:AmazonSES Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When no caching mode information can be found for a disk, use the warning log level rather than error. It is common for this to occur with cheap USB sticks. Signed-off-by: Jeremy Cline --- drivers/scsi/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index a028ab3322a9..9838d94b047e 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -2789,7 +2789,7 @@ 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: @@ -2844,7 +2844,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; }