From patchwork Fri Oct 12 14:57:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10638761 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 5931717E3 for ; Fri, 12 Oct 2018 14:59:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 488A92BECE for ; Fri, 12 Oct 2018 14:59:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D1412BED9; Fri, 12 Oct 2018 14:59:11 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE 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 C08452BECE for ; Fri, 12 Oct 2018 14:59:09 +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=VRvXCkX19oHsGIsvx+r6L7l+dgY+a7WGemL2W/6Ju6s=; b=a9uXiUjcuv3eQFIHI0QoCZ9G11 571ArwMr4d3pJdDF2Au5YqAOhYGyBAfu+wpAyHqJyhSWKbA0djf2pKR7j2UbLwOVHpF+mJrQOY17g A/e8oUEv6tX7Zm2xOZemPMPrc3Pb4KG4faULN6rSHTPc5nFk+0FFYOIfPreZmdaik4xwUYVRBMgab R/bXZyIqp9kKfvqrS8oeGd5PUo/7mu1wxWppWGj/7VjNJECb6n2DhVSRF/gldlhSIWotQ676VR90+ 9iPlf9Nb6MFM4/221gqzT0NpSsseUrbF5+FiCEjJnENBQcIysCyVw/sE7aelcVxt/EOdUx22EMB8J kAGRz3vA==; 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 1gAyu9-0005Nd-DW; Fri, 12 Oct 2018 14:59:05 +0000 Received: from conuserg-07.nifty.com ([210.131.2.74]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAytX-00056x-Sp for linux-arm-kernel@lists.infradead.org; Fri, 12 Oct 2018 14:58:29 +0000 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-07.nifty.com with ESMTP id w9CEvjPB016823; Fri, 12 Oct 2018 23:57:47 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com w9CEvjPB016823 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1539356268; bh=mddxV7i40K2p+WcuchNOgFO0VNs4dZslkYzPME553/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0AOSn2MzD4asqNCffRzt1nQ899BrgC9wWwChcteE0U+W/5nFlHMWzT/0c9RZRfqrt 5Bzb6NAN0Lz4p+bmtZPISZ+DXKzaY/go8UGbbpB3AfJOotJnjyQW1GtorumArDUDO7 lbX108BqsS/3tEYHAC9ZLdmd+uU144QthekduJbbIHy1Ho1p4TFDuiAvy4PLBbjmMg 5DVMf8oUepMaLwxwr9im0syvMFTRuoCSABzDZlfzC8YW0q16Uxg2DXwWrMTqy2KEm+ pwfZ77SLvCiLVyoVv/oz+PIN0TbNvH6gBCucygV5vlXyuTWAEteEaRXBjku+/RQQMh 2jL8FABwfSqXA== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-mmc@vger.kernel.org, Ulf Hansson Subject: [PATCH 2/2] mmc: uniphier-sd: avoid using broken DMA RX channel Date: Fri, 12 Oct 2018 23:57:38 +0900 Message-Id: <1539356258-12374-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539356258-12374-1-git-send-email-yamada.masahiro@socionext.com> References: <1539356258-12374-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181012_075828_283767_39269A24 X-CRM114-Status: UNSURE ( 8.69 ) X-CRM114-Notice: Please train this message. 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: Wolfram Sang , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Masahiro Yamada 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 host->chan_rx is NULL when UNIPHIER_SD_CAP_BROKEN_DMA_RX quirk flag is set. In this case, it should not set up DMA. Signed-off-by: Masahiro Yamada Acked-by: Wolfram Sang --- drivers/mmc/host/uniphier-sd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index 10d49aa..1ee9fd0 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -251,6 +251,9 @@ static void uniphier_sd_internal_dma_start(struct tmio_mmc_host *host, u32 dma_mode; int sg_len; + if ((data->flags & MMC_DATA_READ) && !host->chan_rx) + goto force_pio; + if (WARN_ON(host->sg_len != 1)) goto force_pio;