From patchwork Thu Dec 23 17:11:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 527627 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14FA1C433F5 for ; Thu, 23 Dec 2021 17:12:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349421AbhLWRMJ (ORCPT ); Thu, 23 Dec 2021 12:12:09 -0500 Received: from mxout03.lancloud.ru ([45.84.86.113]:34936 "EHLO mxout03.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349419AbhLWRMG (ORCPT ); Thu, 23 Dec 2021 12:12:06 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout03.lancloud.ru C6A3E20326C0 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , , , Subject: [PATCH RFC 01/13] mmc: bcm2835: fix deferred probing Date: Thu, 23 Dec 2021 20:11:50 +0300 Message-ID: <20211223171202.8224-2-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. IRQ0 is no longer returned by platform_get_irq(), so we now can safely ignore it... Fixes: 660fc733bd74 ("mmc: bcm2835: Add new driver for the sdhost controller.") Signed-off-by: Sergey Shtylyov Acked-by: Florian Fainelli --- drivers/mmc/host/bcm2835.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index 8c2361e66277..985079943be7 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1413,8 +1413,8 @@ static int bcm2835_probe(struct platform_device *pdev) host->max_clk = clk_get_rate(clk); host->irq = platform_get_irq(pdev, 0); - if (host->irq <= 0) { - ret = -EINVAL; + if (host->irq < 0) { + ret = host->irq; goto err; } From patchwork Thu Dec 23 17:11:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 527626 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26F9FC433FE for ; Thu, 23 Dec 2021 17:12:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349429AbhLWRMK (ORCPT ); Thu, 23 Dec 2021 12:12:10 -0500 Received: from mxout04.lancloud.ru ([45.84.86.114]:55810 "EHLO mxout04.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349422AbhLWRMI (ORCPT ); Thu, 23 Dec 2021 12:12:08 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout04.lancloud.ru 8913B209FA31 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Neil Armstrong , Kevin Hilman , Jerome Brunet , "Martin Blumenstingl" , , Subject: [PATCH RFC 02/13] mmc: meson-gx: fix deferred probing Date: Thu, 23 Dec 2021 20:11:51 +0300 Message-ID: <20211223171202.8224-3-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. IRQ0 is no longer returned by platform_get_irq(), so we now can safely ignore it... Fixes: cbcaac6d7dd2 ("mmc: meson-gx-mmc: Fix platform_get_irq's error checking ") Signed-off-by: Sergey Shtylyov Reviewed-by: Martin Blumenstingl --- drivers/mmc/host/meson-gx-mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 8f36536cb1b6..c765653ee4d0 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -1182,8 +1182,8 @@ static int meson_mmc_probe(struct platform_device *pdev) } host->irq = platform_get_irq(pdev, 0); - if (host->irq <= 0) { - ret = -EINVAL; + if (host->irq < 0) { + ret = host->irq; goto free_host; } From patchwork Thu Dec 23 17:11:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 527880 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C517C4332F for ; Thu, 23 Dec 2021 17:12:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349422AbhLWRML (ORCPT ); Thu, 23 Dec 2021 12:12:11 -0500 Received: from mxout04.lancloud.ru ([45.84.86.114]:55822 "EHLO mxout04.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349423AbhLWRMI (ORCPT ); Thu, 23 Dec 2021 12:12:08 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout04.lancloud.ru 021F8209FA39 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Chaotian Jing , Matthias Brugger , , Subject: [PATCH RFC 03/13] mmc: mtk-sd: fix deferred probing Date: Thu, 23 Dec 2021 20:11:52 +0300 Message-ID: <20211223171202.8224-4-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 208489032bdd ("mmc: mediatek: Add Mediatek MMC driver") Signed-off-by: Sergey Shtylyov --- drivers/mmc/host/mtk-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 632775217d35..4bd070a458e9 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -2590,7 +2590,7 @@ static int msdc_drv_probe(struct platform_device *pdev) host->irq = platform_get_irq(pdev, 0); if (host->irq < 0) { - ret = -EINVAL; + ret = host->irq; goto host_free; } From patchwork Thu Dec 23 17:11:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 527625 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDEB0C433F5 for ; Thu, 23 Dec 2021 17:12:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349423AbhLWRMN (ORCPT ); Thu, 23 Dec 2021 12:12:13 -0500 Received: from mxout02.lancloud.ru ([45.84.86.82]:49934 "EHLO mxout02.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349424AbhLWRMJ (ORCPT ); Thu, 23 Dec 2021 12:12:09 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout02.lancloud.ru B955E2022B81 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Nicolas Pitre Subject: [PATCH RFC 04/13] mmc: mvsdio: fix deferred probing Date: Thu, 23 Dec 2021 20:11:53 +0300 Message-ID: <20211223171202.8224-5-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The driver overrides the error codes returned by platform_get_irq() to -ENXIO, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergey Shtylyov Acked-by: Nicolas Pitre --- drivers/mmc/host/mvsdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index 629efbe639c4..b4f6a0a2fcb5 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -704,7 +704,7 @@ static int mvsd_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); if (irq < 0) - return -ENXIO; + return irq; mmc = mmc_alloc_host(sizeof(struct mvsd_host), &pdev->dev); if (!mmc) { From patchwork Thu Dec 23 17:11:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 527878 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 036DEC43219 for ; Thu, 23 Dec 2021 17:12:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349416AbhLWRMP (ORCPT ); Thu, 23 Dec 2021 12:12:15 -0500 Received: from mxout01.lancloud.ru ([45.84.86.81]:41330 "EHLO mxout01.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349420AbhLWRMK (ORCPT ); Thu, 23 Dec 2021 12:12:10 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout01.lancloud.ru 5F6222024192 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Aaro Koskinen , Subject: [PATCH RFC 05/13] mmc: omap: fix deferred probing Date: Thu, 23 Dec 2021 20:11:54 +0300 Message-ID: <20211223171202.8224-6-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The driver overrides the error codes returned by platform_get_irq() to -ENXIO, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergey Shtylyov --- drivers/mmc/host/omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 5e5af34090f1..ecf2a68d0e84 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1343,7 +1343,7 @@ static int mmc_omap_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) - return -ENXIO; + return irq; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); host->virt_base = devm_ioremap_resource(&pdev->dev, res); From patchwork Thu Dec 23 17:11:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 527624 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4FC1C4321E for ; Thu, 23 Dec 2021 17:12:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349425AbhLWRMP (ORCPT ); Thu, 23 Dec 2021 12:12:15 -0500 Received: from mxout04.lancloud.ru ([45.84.86.114]:55834 "EHLO mxout04.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349416AbhLWRMK (ORCPT ); Thu, 23 Dec 2021 12:12:10 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout04.lancloud.ru E7478209FA3A Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Subject: [PATCH RFC 06/13] mmc: omap_hsmmc: fix deferred probing Date: Thu, 23 Dec 2021 20:11:55 +0300 Message-ID: <20211223171202.8224-7-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The driver overrides the error codes returned by platform_get_irq() to -ENXIO, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergey Shtylyov --- drivers/mmc/host/omap_hsmmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 9dafcbf969d9..6d7dd75b7664 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1827,9 +1827,11 @@ static int omap_hsmmc_probe(struct platform_device *pdev) } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - irq = platform_get_irq(pdev, 0); - if (res == NULL || irq < 0) + if (!res) return -ENXIO; + irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(base)) From patchwork Thu Dec 23 17:11:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 527879 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CF22C433FE for ; Thu, 23 Dec 2021 17:12:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349424AbhLWRMO (ORCPT ); Thu, 23 Dec 2021 12:12:14 -0500 Received: from mxout02.lancloud.ru ([45.84.86.82]:49944 "EHLO mxout02.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349425AbhLWRMK (ORCPT ); Thu, 23 Dec 2021 12:12:10 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout02.lancloud.ru C97372022B87 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: =?utf-8?q?Andreas_F=C3=A4rber?= , "Manivannan Sadhasivam" , , Subject: [PATCH RFC 07/13] mmc: owl: fix deferred probing Date: Thu, 23 Dec 2021 20:11:56 +0300 Message-ID: <20211223171202.8224-8-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: ff65ffe46d28 ("mmc: Add Actions Semi Owl SoCs SD/MMC driver") Signed-off-by: Sergey Shtylyov --- drivers/mmc/host/owl-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c index 3dc143b03939..679b8b0b310e 100644 --- a/drivers/mmc/host/owl-mmc.c +++ b/drivers/mmc/host/owl-mmc.c @@ -638,7 +638,7 @@ static int owl_mmc_probe(struct platform_device *pdev) owl_host->irq = platform_get_irq(pdev, 0); if (owl_host->irq < 0) { - ret = -EINVAL; + ret = owl_host->irq; goto err_release_channel; } From patchwork Thu Dec 23 17:11:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 527877 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40DBBC4332F for ; Thu, 23 Dec 2021 17:12:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349420AbhLWRMP (ORCPT ); Thu, 23 Dec 2021 12:12:15 -0500 Received: from mxout01.lancloud.ru ([45.84.86.81]:41338 "EHLO mxout01.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349427AbhLWRMK (ORCPT ); Thu, 23 Dec 2021 12:12:10 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout01.lancloud.ru 4B0B520279EF Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Ben Dooks , Subject: [PATCH RFC 08/13] mmc: s3mci: fix deferred probing Date: Thu, 23 Dec 2021 20:11:57 +0300 Message-ID: <20211223171202.8224-9-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. IRQ0 is no longer returned by platform_get_irq(), so we now can safely ignore it... Fixes: e584e0750213 ("mmc: host: s3cmci: allow probing from device tree") Signed-off-by: Sergey Shtylyov --- drivers/mmc/host/s3cmci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 8d5929a32d34..719a0b9a2c9e 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -1573,8 +1573,8 @@ static int s3cmci_probe(struct platform_device *pdev) } host->irq = platform_get_irq(pdev, 0); - if (host->irq <= 0) { - ret = -EINVAL; + if (host->irq < 0) { + ret = host->irq; goto probe_iounmap; } From patchwork Thu Dec 23 17:11:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 527623 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75C24C4167B for ; Thu, 23 Dec 2021 17:12:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349427AbhLWRMQ (ORCPT ); Thu, 23 Dec 2021 12:12:16 -0500 Received: from mxout02.lancloud.ru ([45.84.86.82]:49954 "EHLO mxout02.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349428AbhLWRMK (ORCPT ); Thu, 23 Dec 2021 12:12:10 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout02.lancloud.ru AB35D2022B92 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Adrian Hunter Subject: [PATCH RFC 09/13] mmc: sdhci-acpi: fix deferred probing Date: Thu, 23 Dec 2021 20:11:58 +0300 Message-ID: <20211223171202.8224-10-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 1b7ba57ecc86 ("mmc: sdhci-acpi: Handle return value of platform_get_irq") Signed-off-by: Sergey Shtylyov --- drivers/mmc/host/sdhci-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index f1ef0d28b0dd..1fa1d2a7bfc9 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -898,7 +898,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev) host->ops = &sdhci_acpi_ops_dflt; host->irq = platform_get_irq(pdev, 0); if (host->irq < 0) { - err = -EINVAL; + err = host->irq; goto err_free; } From patchwork Thu Dec 23 17:11:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 527875 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB050C433FE for ; Thu, 23 Dec 2021 17:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349439AbhLWRMR (ORCPT ); Thu, 23 Dec 2021 12:12:17 -0500 Received: from mxout03.lancloud.ru ([45.84.86.113]:34958 "EHLO mxout03.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349401AbhLWRML (ORCPT ); Thu, 23 Dec 2021 12:12:11 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout03.lancloud.ru 2FA0F20326BE Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Adrian Hunter , Viresh Kumar Subject: [PATCH RFC 10/13] mmc: sdhci-spear: fix deferred probing Date: Thu, 23 Dec 2021 20:11:59 +0300 Message-ID: <20211223171202.8224-11-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. IRQ0 is no longer returned by platform_get_irq(), so we now can safely ignore it... Fixes: 682798a596a6 ("mmc: sdhci-spear: Handle return value of platform_get_irq") Signed-off-by: Sergey Shtylyov Acked-by: Viresh Kumar Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-spear.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index d463e2fd5b1a..c79035727b20 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c @@ -65,8 +65,8 @@ static int sdhci_probe(struct platform_device *pdev) host->hw_name = "sdhci"; host->ops = &sdhci_pltfm_ops; host->irq = platform_get_irq(pdev, 0); - if (host->irq <= 0) { - ret = -EINVAL; + if (host->irq < 0) { + ret = host->irq; goto err_host; } host->quirks = SDHCI_QUIRK_BROKEN_ADMA; From patchwork Thu Dec 23 17:12:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 527622 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3463C4167D for ; Thu, 23 Dec 2021 17:12:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349428AbhLWRMQ (ORCPT ); Thu, 23 Dec 2021 12:12:16 -0500 Received: from mxout04.lancloud.ru ([45.84.86.114]:55838 "EHLO mxout04.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349431AbhLWRML (ORCPT ); Thu, 23 Dec 2021 12:12:11 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout04.lancloud.ru 8A742209FA3B Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , Subject: [PATCH RFC 11/13] mmc: sh_mmcif: fix deferred probing Date: Thu, 23 Dec 2021 20:12:00 +0300 Message-ID: <20211223171202.8224-12-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The driver overrides the error codes returned by platform_get_irq() to -ENXIO, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergey Shtylyov --- drivers/mmc/host/sh_mmcif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index bcc595c70a9f..e12fe29b275c 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1398,7 +1398,7 @@ static int sh_mmcif_probe(struct platform_device *pdev) irq[0] = platform_get_irq(pdev, 0); irq[1] = platform_get_irq_optional(pdev, 1); if (irq[0] < 0) - return -ENXIO; + return irq[0]; reg = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(reg)) From patchwork Thu Dec 23 17:12:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 527621 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66F6FC4167E for ; Thu, 23 Dec 2021 17:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349435AbhLWRMQ (ORCPT ); Thu, 23 Dec 2021 12:12:16 -0500 Received: from mxout01.lancloud.ru ([45.84.86.81]:41350 "EHLO mxout01.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349432AbhLWRMM (ORCPT ); Thu, 23 Dec 2021 12:12:12 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout01.lancloud.ru 302F42027AC6 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Maxime Ripard , Chen-Yu Tsai , "Jernej Skrabec" , , Subject: [PATCH RFC 12/13] mmc: sunxi: fix deferred probing Date: Thu, 23 Dec 2021 20:12:01 +0300 Message-ID: <20211223171202.8224-13-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. IRQ0 is no longer returned by platform_get_irq(), so we now can safely ignore it... Fixes: 2408a08583d ("mmc: sunxi-mmc: Handle return value of platform_get_irq") Signed-off-by: Sergey Shtylyov --- drivers/mmc/host/sunxi-mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 2702736a1c57..b3256708756b 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -1340,8 +1340,8 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host, return ret; host->irq = platform_get_irq(pdev, 0); - if (host->irq <= 0) { - ret = -EINVAL; + if (host->irq < 0) { + ret = host->irq; goto error_disable_mmc; } From patchwork Thu Dec 23 17:12:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 527876 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49C66C433F5 for ; Thu, 23 Dec 2021 17:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349431AbhLWRMQ (ORCPT ); Thu, 23 Dec 2021 12:12:16 -0500 Received: from mxout02.lancloud.ru ([45.84.86.82]:49964 "EHLO mxout02.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349435AbhLWRMN (ORCPT ); Thu, 23 Dec 2021 12:12:13 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout02.lancloud.ru A31CF2054823 Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov To: Ulf Hansson , CC: Jesper Nilsson , Lars Persson , Subject: [PATCH RFC 13/13] mmc: usdhi60rol0: fix deferred probing Date: Thu, 23 Dec 2021 20:12:02 +0300 Message-ID: <20211223171202.8224-14-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20211223171202.8224-1-s.shtylyov@omp.ru> References: <20211223171202.8224-1-s.shtylyov@omp.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The driver overrides the error codes returned by platform_get_irq() to -ENODEV, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergey Shtylyov Acked-by: Jesper Nilsson --- drivers/mmc/host/usdhi6rol0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c index 99515be6e5e5..2032e4e1ee68 100644 --- a/drivers/mmc/host/usdhi6rol0.c +++ b/drivers/mmc/host/usdhi6rol0.c @@ -1757,8 +1757,10 @@ static int usdhi6_probe(struct platform_device *pdev) irq_cd = platform_get_irq_byname(pdev, "card detect"); irq_sd = platform_get_irq_byname(pdev, "data"); irq_sdio = platform_get_irq_byname(pdev, "SDIO"); - if (irq_sd < 0 || irq_sdio < 0) - return -ENODEV; + if (irq_sd < 0) + return irq_sd; + if (irq_sdio < 0) + return irq_sdio; mmc = mmc_alloc_host(sizeof(struct usdhi6_host), dev); if (!mmc)