From patchwork Mon Jan 3 03:03:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 529625 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f5c:0:0:0:0:0 with SMTP id l28csp546477imf; Sun, 2 Jan 2022 19:01:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJy94jW6qqEluDXB+jBGqo/1ubW6qx5wBXBaucNq/VFSt3iesoQJMF1aUtEK+eW38vzEn/7T X-Received: by 2002:a17:902:d2d0:b0:149:3d85:229d with SMTP id n16-20020a170902d2d000b001493d85229dmr43326943plc.151.1641178899847; Sun, 02 Jan 2022 19:01:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641178899; cv=none; d=google.com; s=arc-20160816; b=wjnxiAZJaKygK1SJpVDA90xS4OSrLWgcOJVHaL9C0npGsyzvKzaAFoZgdZIj8hpELc /5xuZVvMA2W3vS+zM/TtKlXdEfOfQ39nRu8hNlKngnR13wqp7LIdA2azN2Wso7mFjoOc V7ssMd8JNXXZ1p4VVqZHbf6NJ7V7JdUnhf884wzgOda4VT1kWpioDMhI3a+WZES41XsJ 7Kt7IEQ6VnaI6YLmX0+EpfqXo+s6qWJ89BBaQ2W1vdtM3bSPZg+VpMpckfoBVNpSyq4b FUThzxtb2+u+kTOTdt7DeLJRpDY/YAIAyhci3DiKCvmJYduh8p9RXCYRhxQbh6zmDeh2 7zGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=CNvdCDRwZ436i+AZ03dlnNHkzoeXZWJYdZnpIQDMN3w=; b=iGe5KIdgqgSKHKnETuhOh/GT+fFdXQXFQFaE2g//+wm8k/xISBQmhFDUAgQ4e+VsUQ p/ouURVV/5Bh8v3iO50XnImV0FOUme+WPyYZCG3Mm+J8ppV0Ir0Ro2SwRVjEsAhgk/zA K7WzgZJFEN8FgBNbvops49DrKeAu8cWqS4KeOVqy9zOZ2F2CaIRv9czq4mqhD1ERDp63 Sf5TqsaYvdtBeCT6Qz5mc/RwL+e/4ndVICGWwsbhB+nyZ9xATK8n2n2ozP/4jLFEbXRV DaR2ihtUzivH5gpcl8nQn4LVMzleWzLUl/2X9e7zXN7TV9M3z8c0tXHQa7eydDGM0eyy Loiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=b6izMUFf; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DerPVSiR; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id p8si31352799pjn.176.2022.01.02.19.01.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jan 2022 19:01:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=b6izMUFf; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DerPVSiR; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CNvdCDRwZ436i+AZ03dlnNHkzoeXZWJYdZnpIQDMN3w=; b=b6izMUFfPCRG1B oMgk2xXACAGJB+926bMMbmCb/CwsYAunfnWZM4p9x7/EfK9L8a5V0JI40YAVw9mjC+NdqqH6i8k+T sv4tQD6ZPHv6ZixDP8o2jL1tvedT81gqWHI8L1933Zpc4ojs+LIuU2TeYmlo2r0xEDLLxw87k7liJ tDun1PgH7QwK9xsAhqeHRit8raQVgxS2ZDjyZKuZn+Revc8xLb6tY3RhTM3wdxgFtSN4kaaweVCr0 dZODxRZfGAmyO8Z+1e9UvISeohogyqdIpCuBYqabmI+fPF5cIMRfhjbxFIej17Z1hJ6r0e4GFPKO5 oXQIwaGAQnTSxkFhOt2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4DbA-008JxG-Tz; Mon, 03 Jan 2022 03:01:24 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4Daw-008Jvj-93 for linux-mtd@lists.infradead.org; Mon, 03 Jan 2022 03:01:11 +0000 Received: by mail-wr1-x42a.google.com with SMTP id q16so67350423wrg.7 for ; Sun, 02 Jan 2022 19:01:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=f/23sp1iBvoUiVjjVi++1/pRdYTmKhtlANlkSerXd08=; b=DerPVSiRTyAmcw+c3wNyWOUveWjaeSeWQbISCGTOmlLtnHgSZ6dPLTl4tjHPVh46x8 lXxww8s9V2qHt3e+UGTGACJFjapchh17MBcLWV810s8qaavG5a7a7a4cbc+VkcT8GjYy 1XhLfiGnOU9Wx/ahden2LvW0GGh7uAWCapqWM7OrPauoyqPEHuKboG+NcYqjEdh/oC7g 5ocDTgATAybN7Ya2YxVtI88y+I6X0xAQK8CjEYAnDh5CqBu0HuC9S5fKjpJzoXQd56JT XcG0EvkZpyjDQYQ8xxlZzA8ZyukWXgrcHUnjNbZ1uT4k2LD4DHFvX7hcpE0Vyb6i0ebR iI+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f/23sp1iBvoUiVjjVi++1/pRdYTmKhtlANlkSerXd08=; b=qazU7xOedJ3/lV5kWwy5hkdwlDfsqjvbqbxhXzx7eA8lfR16Jefvz/e7yYqB96rwgY iV8ZiwYxAhAvGVt9IX9X8mRvvgeJXeyCJ3ls7Rgus2Q+YLm8xSbc7pkX45jwNlmVvH74 TDqQXGKiSK7Q5N1La+/qZcjjTgU7rENRXOyIEuCAj1aZ45mR6o5h5Y37y7dzTKDQJwOm NCqPCsCIfeDeB8CIcDleRxfYav3UN0PUdNxd3tWVfEm2W7X8MSQ/sE30QhwuODKui72u V55wrTIfglbg/6s3SAq+LKe4JzQXMA1mvPS6YbuPrgw7iMaKMLDhhWaX/ijrmpY35TFd HI8w== X-Gm-Message-State: AOAM533sL5IA8ZUP3jYwO5cTYL3hoaBxjSjpIH+I2Z72rXZZ1fv2c9Ew BohXaho/WU+opHJeL4/1vvyk6Q== X-Received: by 2002:adf:9d8c:: with SMTP id p12mr36533639wre.622.1641178868914; Sun, 02 Jan 2022 19:01:08 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id p11sm38095667wru.99.2022.01.02.19.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jan 2022 19:01:08 -0800 (PST) From: Bryan O'Donoghue To: linux-arm-msm@vger.kernel.org, linux-mtd@lists.infradead.org, mani@kernel.org, miquel.raynal@bootlin.com, architt@codeaurora.org, bbrezillon@kernel.org, absahu@codeaurora.org Cc: baruch@tkos.co.il, bryan.odonoghue@linaro.org Subject: [PATCH v2 1/2] mtd: rawnand: qcom: Fix clock sequencing in qcom_nandc_probe() Date: Mon, 3 Jan 2022 03:03:15 +0000 Message-Id: <20220103030316.58301-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220103030316.58301-1-bryan.odonoghue@linaro.org> References: <20220103030316.58301-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220102_190110_328254_0BB6075B X-CRM114-Status: GOOD ( 15.59 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Interacting with a NAND chip on an IPQ6018 I found that the qcomsmem NAND partition parser was returning -EPROBE_DEFER waiting for the main smem driver to load. This caused the board to reset. Playing about with the probe() function shows that the problem lies in the core clock being switched off before the nandc_unalloc() routine has completed. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org Interacting with a NAND chip on an IPQ6018 I found that the qcomsmem NAND partition parser was returning -EPROBE_DEFER waiting for the main smem driver to load. This caused the board to reset. Playing about with the probe() function shows that the problem lies in the core clock being switched off before the nandc_unalloc() routine has completed. If we look at how qcom_nandc_remove() tears down allocated resources we see the expected order is qcom_nandc_unalloc(nandc); clk_disable_unprepare(nandc->aon_clk); clk_disable_unprepare(nandc->core_clk); dma_unmap_resource(&pdev->dev, nandc->base_dma, resource_size(res), DMA_BIDIRECTIONAL, 0); Tweaking probe() to both bring up and tear-down in that order removes the reset if we end up deferring elsewhere. Fixes: c76b78d8ec05 ("mtd: nand: Qualcomm NAND controller driver") Signed-off-by: Bryan O'Donoghue Reviewed-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index 04e6f7b267064..0f41a9a421575 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -2,7 +2,6 @@ /* * Copyright (c) 2016, The Linux Foundation. All rights reserved. */ - #include #include #include @@ -3063,10 +3062,6 @@ static int qcom_nandc_probe(struct platform_device *pdev) if (dma_mapping_error(dev, nandc->base_dma)) return -ENXIO; - ret = qcom_nandc_alloc(nandc); - if (ret) - goto err_nandc_alloc; - ret = clk_prepare_enable(nandc->core_clk); if (ret) goto err_core_clk; @@ -3075,6 +3070,10 @@ static int qcom_nandc_probe(struct platform_device *pdev) if (ret) goto err_aon_clk; + ret = qcom_nandc_alloc(nandc); + if (ret) + goto err_nandc_alloc; + ret = qcom_nandc_setup(nandc); if (ret) goto err_setup; @@ -3086,15 +3085,14 @@ static int qcom_nandc_probe(struct platform_device *pdev) return 0; err_setup: + qcom_nandc_unalloc(nandc); +err_nandc_alloc: clk_disable_unprepare(nandc->aon_clk); err_aon_clk: clk_disable_unprepare(nandc->core_clk); err_core_clk: - qcom_nandc_unalloc(nandc); -err_nandc_alloc: dma_unmap_resource(dev, res->start, resource_size(res), DMA_BIDIRECTIONAL, 0); - return ret; } From patchwork Mon Jan 3 03:03:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 529627 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f5c:0:0:0:0:0 with SMTP id l28csp546856imf; Sun, 2 Jan 2022 19:02:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmOMtTaBLimN22f2HQRs3GwKhk5H9edMTkh7NNjDqk3eUc2vRB9HV3o6PBqELl+i8qcaBf X-Received: by 2002:a62:cd8b:0:b0:4ba:e907:c8d7 with SMTP id o133-20020a62cd8b000000b004bae907c8d7mr44640472pfg.35.1641178951426; Sun, 02 Jan 2022 19:02:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641178951; cv=none; d=google.com; s=arc-20160816; b=P+dFdoKUOeeRH5T1JkNQ94DQVLRBr8wkuqh2g+RwlbiPZGbUk+aCpv1POvK8ClgTNe JZOsL6cFD8p5zA3HUZgQ/2FA8piBJfdc0fTH+Jlqc0V9iv8G/uhGS15cQdBIot0upBgz oyGOCmK/V/fCAQCgkD/mWXf7g8V1ORLm6pAYyGkiReSogiaW0rxgVfBCWkA+7rdQpzsm VTBbiU8rZSgWWhIc4NwkwYhTDg0ombxrZzVEadRoAnAwn3NqMAGVSzZhFN/jndFoktoX DCjOrLhtBmpiI7hivm1qSPmVFmVuGoKQhf01mpq3aCTp0MfzQICPpy7r1vvc/gzAGJCs v83w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=pQcll0qG1eqk9J7Frse1sU/Drm7D1eK0r1Zanz8GRWo=; b=TpPxgOubyeQ3GvC7SmJ9XS1nm1tWiH8yOichCvevTlax5jN913tAlqduz2OxxBW2mn K6+VhO/HALUBwEod7BdqX5C8bbMfbHcn4O87j4lqnO4JH1s507WlyHpd3MUCuAHK3v22 8c4Uo1TiHMFQ8751A16bmwr/x8/Mm4c//nRr5mq74TDjwjxbePRvEwQE5pe0Dj4Y6lK1 Wrv8PtWZE3BQReSBSaH6KtfS7nUPgAdYwB/nEhKB/4qGR+kQtJMBPd2RgASXdA5LHFMZ 9Nf/o3UEBsc02l0pP84yxwU85KLdVxK1aDWI3lZTMEpUTrEx8CF+4EI7AMqbhje/bwSJ 2vlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=uCv277qN; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Jc39l714; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id j15si1701968pfu.144.2022.01.02.19.02.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jan 2022 19:02:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=uCv277qN; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Jc39l714; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pQcll0qG1eqk9J7Frse1sU/Drm7D1eK0r1Zanz8GRWo=; b=uCv277qNtQeYvO p+/ZbCx7m5aWpvTsSXhoR9vJ0Cw35MSNC871fnwc46ofPk2XwZ6WlKUsM2OgLxC36PaXPC2mEcXfb OtGOI4q4M58Q39i6pD/MU68pRwd0bRQKkSK4DewMITuj7T7ABkFv5qPazG0ne8Rlk0A/uSX7h4bZh 58zCON/cFMCqtXGZDaXnEaIS0gwdBUg17ic/Vf20LIn/wpCU6ccyNGCYcEF0KA4MVB1mshpuI1Ssy LskX7WagqHGLNoYyom3qJvUy/7mVfJ7lBPt2qd53tr2kAxSOL3zpsIRb7+ZzD2VONSRitSJ+QuD7E Zxyk6ClDgQX0vKR1FqVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4DbN-008Jxq-6J; Mon, 03 Jan 2022 03:01:37 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4Dax-008Jvv-8Q for linux-mtd@lists.infradead.org; Mon, 03 Jan 2022 03:01:12 +0000 Received: by mail-wm1-x32b.google.com with SMTP id n14-20020a7bcbce000000b00332f4abf43fso9768584wmi.0 for ; Sun, 02 Jan 2022 19:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lXNaCmB23l/v2SBkvx4jJIGXGemsehmfOVCATDay3ag=; b=Jc39l714mUnC6C71RckghH7B3nzIZLbhMQeM0gMoxDyYQi0Gj7qpZlTgLb6JzaYooK IPPHwZ0v14fTzwNAiUgPbXz4abv45FHv6KfKuWZXm2Z6lKklWCdXZ0AO72nyuXXlhbN5 /4d5GD8SNFryQV2ToR6haL3qQH3k1pnjCqZ2sO9I7PzMGEPhYtFI6+yyS/KnlmcJvXCU Mtxmi9sTVzeo3ZLzcVIesoBITbk011rG5kh9CtZLlHQuEbGvlaI0U7EgbsnwH1Zwg9gl luUSSPqU/S1hyDxgqcWo9t2QemifPJrDVhyC9pGwsN1IaADq+/GmgdZ8rIPQcALqH5Wf sCRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lXNaCmB23l/v2SBkvx4jJIGXGemsehmfOVCATDay3ag=; b=ryDA5AgfJlPcjsXCQRoHJgPr6z5dU/ggX92b2wsNCG6TnJbMQxDZLrTeYRI2luw1OA sBO7r0dDqxW5OGjPGC1vDf6MgFD9Bsokdef75uJwtukn6bKlMicVgKcWZyTMOOPnAolE 0EKztvWDKDgeDKUevKJDcbAQXrdE8sMmjXgVm7Jy4HFca9N3PldpwkyJDprOn4pFJa+G JHitL/L46+A7gw8BI1ql2cnTjPSooJHwqfXQLScXCaopGzgHK6NuJvuvPWR1h5PCwOcq rjffuEDcXBZbt6cMuoT6CzDlryz2c49ojGduIGH2gRL1NaE4xpcN/WGg46QtLHckgkK+ nEgA== X-Gm-Message-State: AOAM533/tWXJKfxLXp8ydEpXkFvXD2cFuuL5QdZOcEH8szrF/wXPOHYQ whw/JZjFPOa0fOW3TIEZaiEQsg== X-Received: by 2002:a05:600c:2103:: with SMTP id u3mr36391606wml.6.1641178869846; Sun, 02 Jan 2022 19:01:09 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id p11sm38095667wru.99.2022.01.02.19.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jan 2022 19:01:09 -0800 (PST) From: Bryan O'Donoghue To: linux-arm-msm@vger.kernel.org, linux-mtd@lists.infradead.org, mani@kernel.org, miquel.raynal@bootlin.com, architt@codeaurora.org, bbrezillon@kernel.org, absahu@codeaurora.org Cc: baruch@tkos.co.il, bryan.odonoghue@linaro.org Subject: [PATCH v2 2/2] mtd: parsers: qcom: Don't print error message on -EPROBE_DEFER Date: Mon, 3 Jan 2022 03:03:16 +0000 Message-Id: <20220103030316.58301-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220103030316.58301-1-bryan.odonoghue@linaro.org> References: <20220103030316.58301-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220102_190111_318964_F681EFB2 X-CRM114-Status: GOOD ( 12.13 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Its possible for the main smem driver to not be loaded by the time we come along to parse the smem partition description but, this is a perfectly normal thing. No need to print out an error message in this case. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:32b listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org Its possible for the main smem driver to not be loaded by the time we come along to parse the smem partition description but, this is a perfectly normal thing. No need to print out an error message in this case. Signed-off-by: Bryan O'Donoghue Reviewed-by: Manivannan Sadhasivam --- drivers/mtd/parsers/qcomsmempart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/parsers/qcomsmempart.c b/drivers/mtd/parsers/qcomsmempart.c index 06a818cd2433f..b2a57fe8479fa 100644 --- a/drivers/mtd/parsers/qcomsmempart.c +++ b/drivers/mtd/parsers/qcomsmempart.c @@ -75,7 +75,8 @@ static int parse_qcomsmem_part(struct mtd_info *mtd, pr_debug("Parsing partition table info from SMEM\n"); ptable = qcom_smem_get(SMEM_APPS, SMEM_AARM_PARTITION_TABLE, &len); if (IS_ERR(ptable)) { - pr_err("Error reading partition table header\n"); + if (PTR_ERR(ptable) != -EPROBE_DEFER) + pr_err("Error reading partition table header\n"); return PTR_ERR(ptable); }