Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp214504rdh; Wed, 25 Oct 2023 23:12:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+nFVDEAnuoweR1bwlf0SoiLM9/St18RE3F4RIDrC/b4JjFbmJD3BKxlsWTbfqTAQ968Qu X-Received: by 2002:a25:d20e:0:b0:d9a:c4cf:a066 with SMTP id j14-20020a25d20e000000b00d9ac4cfa066mr16450397ybg.34.1698300753641; Wed, 25 Oct 2023 23:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698300753; cv=none; d=google.com; s=arc-20160816; b=sPllm54rWPtFVfwwY3U3wo2eB1gALZwEywOSmywilM3uzuv44a2PMSV4QM8fU/+0mf 4tMphJ7H55dkSIXvlLIlPIPg80qsV9aL6JIYRHcHm2Ic5s1KeAJFH/8G2iFnz3j0629Q NBQcq/NG6a9ihD9IupqRaQ1cfMUP6cybVBuObEKL35y8p5OUT9jmHI4zwbcSDrg1RUIW 4rEurjfmNFEV5+oMmzyOOMGqMsJLCzFZJT1JVuum0xnCcigsd5rdz4jSdfYOq2sEtwrh refd2dEH0R/ONzQBwr43j4XONbIa1rqXdY7Pf/GpTfLg8oUi+lwb5+IVTbRinxMEoTvg xQWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UUmCoi9sFG2gDuFW3OlSaYRvhK1O3scFJQltzhb7fyE=; fh=vv62u3m0gmhIGlFUyzrYIU0aERgvayOctB1kTTQcQjk=; b=fxrvLTHo9vZRB6RtRyP/myc39jiwlIOS73KZlm7EwcxnOSSSAPEpb74U1PG1hcNdb3 9f4BYbJ3Zv1nC3c7bZq6doE70CeCSUnklSHsd3tu1jzXUrQnTaXquq1kzy1ZJP7fxj+D eqN2jfwdjeTUIZLMtKiNt8wbIXf8+MVGCj4MJ2foZZFVi1EyYfPVsrR5xoRjhgOCTdxl SnHynjIA4aPkU2Hwb1M8Sly5HdxVH1NKU2GSAKtpbuHKYgbupEUEAZ6LKkr/9y0oWVoW cz8D2hW6mq602G7fXkQt1Axqz7jgS6qmHfyCWsxbaT8XK5PNulzIf0EMNas9TVBvMxDT A+tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=H4SX4had; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id e72-20020a25694b000000b00da06203c706si5123929ybc.318.2023.10.25.23.12.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 23:12:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=H4SX4had; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 99FD48115A89; Wed, 25 Oct 2023 23:12:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344100AbjJZGMW (ORCPT + 99 others); Thu, 26 Oct 2023 02:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343862AbjJZGMU (ORCPT ); Thu, 26 Oct 2023 02:12:20 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAD77115 for ; Wed, 25 Oct 2023 23:12:17 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 39Q6BjYj074753; Thu, 26 Oct 2023 01:11:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1698300705; bh=UUmCoi9sFG2gDuFW3OlSaYRvhK1O3scFJQltzhb7fyE=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=H4SX4had2TqA/rDyNI8f+yNlJESgMdnCkK+oMvBlq2i28a5dITife4wRZHl0Sfqh5 7jPLgktJK/5gmSXjCM5gkReG8i+UqZnJps7G+uRJIIZLl0B2h374EFHdFy/Tp3c1G6 4Af66N4pbSgkFzGV8snQQi4S25OtLdZa9y8gkQQQ= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 39Q6BjIP098846 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Oct 2023 01:11:45 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 26 Oct 2023 01:11:45 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 26 Oct 2023 01:11:45 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 39Q6BhqZ101067; Thu, 26 Oct 2023 01:11:44 -0500 Date: Thu, 26 Oct 2023 11:41:43 +0530 From: Dhruva Gole To: AceLan Kao CC: Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mika Westerberg , , Subject: Re: [PATCH v4] mtd: spi-nor: Improve reporting for software reset failures Message-ID: <20231026061143.bjbgfkyhnnyh2ovb@dhruva> References: <20231026012017.518610-1-acelan.kao@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20231026012017.518610-1-acelan.kao@canonical.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 25 Oct 2023 23:12:30 -0700 (PDT) On Oct 26, 2023 at 09:20:17 +0800, AceLan Kao wrote: > From: "Chia-Lin Kao (AceLan)" > > When the software reset command isn't supported, we now report it > as an informational message(dev_info) instead of a warning(dev_warn). > This adjustment helps avoid unnecessary alarm and confusion regarding > software reset capabilities. > > Signed-off-by: Chia-Lin Kao (AceLan) > --- > v2. only lower the priority for the not supported failure > v3. replace ENOTSUPP with EOPNOTSUPP and check the first command only > v4. move the version information below the '---' line > --- > drivers/mtd/spi-nor/core.c | 5 ++++- > drivers/spi/spi-mem.c | 2 +- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c > index 1b0c6770c14e..42e52af76289 100644 > --- a/drivers/mtd/spi-nor/core.c > +++ b/drivers/mtd/spi-nor/core.c > @@ -3252,7 +3252,10 @@ static void spi_nor_soft_reset(struct spi_nor *nor) > > ret = spi_mem_exec_op(nor->spimem, &op); > if (ret) { > - dev_warn(nor->dev, "Software reset failed: %d\n", ret); > + if (ret == -EOPNOTSUPP) > + dev_info(nor->dev, "Software reset enable command doesn't support: %d\n", ret); Does "Software reset command isn't supported:" make more sense? > + else > + dev_warn(nor->dev, "Software reset failed: %d\n", ret); > return; > } > > diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c > index edd7430d4c05..93b77ac0b798 100644 > --- a/drivers/spi/spi-mem.c > +++ b/drivers/spi/spi-mem.c > @@ -323,7 +323,7 @@ int spi_mem_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) > return ret; > > if (!spi_mem_internal_supports_op(mem, op)) > - return -ENOTSUPP; > + return -EOPNOTSUPP; Reviewed-by: Dhruva Gole > > if (ctlr->mem_ops && ctlr->mem_ops->exec_op && !spi_get_csgpiod(mem->spi, 0)) { > ret = spi_mem_access_start(mem); > -- > 2.34.1 > > -- Best regards, Dhruva Gole