From patchwork Sun Dec 23 20:59:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10741809 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2E9B66C2 for ; Sun, 23 Dec 2018 21:00:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BF3B28783 for ; Sun, 23 Dec 2018 21:00:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FE412878E; Sun, 23 Dec 2018 21:00:35 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B7EB128783 for ; Sun, 23 Dec 2018 21:00:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=0Cfst0aavwq2BzhOoJiKH5s4NpJ/Us+GjXPJ4zrLsg0=; b=ZZ4 op3YV27iZX0UKzSqXuUq2LaE+MP3aEAQmT8Rdvb/NFFHbn+wqbOszDRj6XW3ajga4pCSwUf3L4gvo ZheL4Sb+6+oiR1HdK8EBuDjmzKY1qn/zgS8gwvVv6TSbD2Bz8Lw0hQ/tW2MwUuIDngXtzfUoFvHrp wADpWDQf/OcQj2dRuqMLquQTkjTnYDP94Ml87y52NZhbu9+9n3h0+0X7oerCqM/RLjCwl9atrORaV DAWfKL1pif2kz0UoT1x6vjaOmbSa3NqSXmUo+2dM64jUixp5JllINpIuIDUX2KNTo2pRF3og+BnsP 8TFZ0aIA+N69i6dOIQTBKCcJIb86Jjw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gbArL-0005Ta-RL; Sun, 23 Dec 2018 21:00:27 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gbArH-0004QG-NL for linux-arm-kernel@lists.infradead.org; Sun, 23 Dec 2018 21:00:25 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MSZDt-1gz0AW3YfB-00SsKG; Sun, 23 Dec 2018 21:59:57 +0100 From: Stefan Wahren To: Al Cooper , Adrian Hunter , Ulf Hansson Subject: [PATCH 1/2] mmc: sdhci-iproc: handle mmc_of_parse() errors during probe Date: Sun, 23 Dec 2018 21:59:17 +0100 Message-Id: <1545598758-4502-1-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 X-Provags-ID: V03:K1:FsBhp74NqgbMckX6QGEkM7zbuM0fjnbtNqB9c5GjfSu+JG+zOVC nt6p6+TF28Gk+lb0VFAh2hNrWHdwlR1sqk5ygcbOiXLgQ93PecRf9Zl130rJ7qR4Km04fzv AR0JypQ0XgjJ+nia824FdeQ9oO4xRynoGH5q7Raco0HsIMewr0syOybYSJgsqI5UUptIo+5 FhdCMrpIfxuFpRh23naog== X-UI-Out-Filterresults: notjunk:1;V03:K0:7uvqm/6Tn2w=:qedwftyLF+r+WaFGRyzPKR vItrffDfG7f534X5qt1icf/24c6TYj93h3+1AKvP593z2hpmJxIemKNrdRT7/zXPP+Ipke8UQ I08zvqpRa5wcGU3iO0jQaPt/WU58GkdmjkiuWzotVkbcj4+NuMi4iMPfiAMd1VdT5ouv2omWI /7S/9AqsTnPbNYo+5i1oNsSFDmrxWvlKZC9K+Ab8vTe8J9L+wUiRCWFHsOr0C9lC1J3MRHbgZ OPX3nnGBLnuKcWjrMJyIjqsNOJ2w89xWpOFvNfsPTrVhHX/xApgyQQcbDBXvwgMh709QJowTD 88M4HvgmrK3Ah0BS164aJZtufA38R7Fpay/nQ6hojx7BKV6OM712L+vkkzNuK4MrfQKtQeiv5 sf7mvN2YqPw13dJxC70+a8u2MvwhX7Udha2YtQJT7ZhcqlIYkVb4HoDJ565iYqAe/jp9npFjh 3wPekqu1cY3V/0rhdWVETv/Atcchi598SE0RS4cL8/C7Z189r2wCrohPWDDedc8/AmF+J9y4N 2lAHyAmq7u7IUBkxmYHzFu+KvE6jVNgVFm6mB21lO2gHqTIz6toyP36igFPxPp0FZrigwqCWb Ot1jt/Ep+g9ykC8xjM36X5RKjfDrAOpgwSb+FWRqaablXguW1xgCC2weNx8PjENo21hCxHNgG 2jSstrMAZFww3b39FzyTblcT3LcsuU6JOjyIMPCApzh0y7wgI+VVT+y3jyezQpszpAxbbdYnS WH896vn09u7vjjjfG9zlqROWkG+q3ZLGfxrm4gRjo5HnJF78W1Fq11QIq0U= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181223_130024_058181_62761026 X-CRM114-Status: GOOD ( 14.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , Florian Fainelli , Scott Branden , Ray Jui , linux-mmc@vger.kernel.org, stable@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, Gregory Fong , Brian Norris , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We need to handle mmc_of_parse() errors during probe. This finally fixes the wifi regression on Raspberry Pi 3 series. In error case the wifi chip was permanently in reset because of the power sequence depending on the deferred probe of the GPIO expander. Fixes: b580c52d58d9 ("mmc: sdhci-iproc: add IPROC SDHCI driver") Cc: stable@vger.kernel.org Signed-off-by: Stefan Wahren Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-iproc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index 0db9905..9d12c06 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -296,7 +296,10 @@ static int sdhci_iproc_probe(struct platform_device *pdev) iproc_host->data = iproc_data; - mmc_of_parse(host->mmc); + ret = mmc_of_parse(host->mmc); + if (ret) + goto err; + sdhci_get_property(pdev); host->mmc->caps |= iproc_host->data->mmc_caps; From patchwork Sun Dec 23 20:59:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10741811 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 602496C2 for ; Sun, 23 Dec 2018 21:00:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EF0E28783 for ; Sun, 23 Dec 2018 21:00:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42E9C2878E; Sun, 23 Dec 2018 21:00:42 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B806628783 for ; Sun, 23 Dec 2018 21:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=4NNhP8an6u2ISGxGZQdgYcaqrGI24Woi+IDHKrWqUw8=; b=UnEmmexXJi7TS0flcQZRlSJKlX Xo3iNRxhTLOdqIS94V4Ho2PWuDAvTHNFafVl9vaiWsobs9fhFz9vbWTV904YFLAnWK3jJDnqnC7ht JctHgwRP2C+jUZkFbhLUfgu3clLCiT8/XkAgfOopm1EEP1zkQ9b5L+U1AQHA32TRerPO8ZMLPDi7b X1aiamW9W1zHxcuQnBwik1kPQl2JdYOXp3EaFhLuXBFn8F9KGQEPl6MvtWHeRJZK9tHOJV58/ZZ+e oNXeC32e++BV88e6BgYCuYAHTl2rHVIP31EoA6/1p4XyQ0SV4rP8tpFEecHMld4NFk7jP/OR+tyTE G2qv2Pxw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gbArW-0005iL-2i; Sun, 23 Dec 2018 21:00:38 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gbArH-0004Qc-Kb for linux-arm-kernel@lists.infradead.org; Sun, 23 Dec 2018 21:00:25 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MW9zm-1guJD21QGw-00XZA3; Sun, 23 Dec 2018 21:59:58 +0100 From: Stefan Wahren To: Al Cooper , Adrian Hunter , Ulf Hansson Subject: [PATCH 2/2] mmc: sdhci-brcmstb: handle mmc_of_parse() errors during probe Date: Sun, 23 Dec 2018 21:59:18 +0100 Message-Id: <1545598758-4502-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1545598758-4502-1-git-send-email-stefan.wahren@i2se.com> References: <1545598758-4502-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:8cal1Kc/nTZq3OJsN1s5PdEToRpB1EOEO5pTJg9AixhZByGmQEB hunFfgOWblA8zSFS1Jt5pnCnVnuGALKCrGncgBBQN1S9hLIGY6TPfI1wY4pOBagn3XgSFIb bVZ/oij85rCH5RlrNbX+Mr7i4p5rGHPDfaliJs0frw83q1KJT7dHH8NQo7ymipk8nthymme S1Loub+9o0xy9kFuFlnZg== X-UI-Out-Filterresults: notjunk:1;V03:K0:y/Cv1Tpp9og=:4ZIrDc4QvMd0Ux2f18Y1u8 rs+WcoiZZYc0UV9yrXjdKgkx8WJImfKy7OH8d2P9AxoUMBwR3SyH15NjFVNhln84V3r16FXG0 SJUe+tBXv2FAC5Cdj/UsUG7FVnfb8/O2H9rNuTgx0BHgt7lRsGY8XXYLdaZEZeuQUp8Qzb4a6 1OTJhX5HQMEA9OFRsEKq4YuWiVCt3Ne1dPdiBbvOtDNzl0Cd7o0qJno65lLxIPtX6Es8LHhDT MGLY6Krm8XGKWTRmZ3wRASN6kd1k0FpEb929XEqbT8smbFCyW1x8yohXYRBm/EIpctc/La7p8 TM/WF8VfuKtEY7A558NnWY2L3gTnbXgOCVF+lh18YvLWMZSLsWbfBZt9rKbgd+VdQEvBZNIEG zAtSPeS05lIgkEm5xb5uQm32yrMqQLKzaDrLcMZ/wl27ggJtm//wtwDsjoKeHxZbXoCoiNNkV CHSbqpXBbg/JI+tP36GMrgnjbfwRBP6nTwsUvCGQHnoKr38OjCbB4AHqghofnF+p1i0LA70GW tdEXUI6AkYHFUT5PDf8Zwrsib0Z495oVq5/g4Cogqy5pnxFtt64AsU/Z3K+6V7jzEBMrrrHJo p2SJCJtd7BD8gDOG3DNvSCXKS0LCoCqLTwVGoTwWKBp49BybC84CSUzQxy5Ufk2ZMaT5BBz25 /fPv3CGw36nDswU14qHqW8voPTyddPRr9GMbV5TeNS/fpV1tw2/cA00OYNpL89JRNazlsvLDk Ia5DluwPA5VuW7HhCENv4Udnt9sOIsxwRu3B1R7cLShDpmVjtRiyqnFNTx8= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181223_130024_027915_07176B44 X-CRM114-Status: GOOD ( 16.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , Florian Fainelli , Scott Branden , Ray Jui , linux-mmc@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, Gregory Fong , Brian Norris , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We need to handle mmc_of_parse() errors during probe otherwise the MMC driver could start without proper initialization (e.g. power sequence). Fixes: 476bf3d62d5c ("mmc: sdhci-brcmstb: Add driver for Broadcom BRCMSTB SoCs") Signed-off-by: Stefan Wahren Acked-by: Adrian Hunter --- Hi, since i don't have this hardware, so it is only compile tested. Would be nice to get a Tested-by. Regards Stefan drivers/mmc/host/sdhci-brcmstb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c index 552bddc..1cd1035 100644 --- a/drivers/mmc/host/sdhci-brcmstb.c +++ b/drivers/mmc/host/sdhci-brcmstb.c @@ -55,7 +55,9 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev) } sdhci_get_of_property(pdev); - mmc_of_parse(host->mmc); + res = mmc_of_parse(host->mmc); + if (res) + goto err; /* * Supply the existing CAPS, but clear the UHS modes. This