From patchwork Mon Jan 22 08:53:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10177749 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B739D60224 for ; Mon, 22 Jan 2018 09:02:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2D8827C0B for ; Mon, 22 Jan 2018 09:02:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9566B27F4B; Mon, 22 Jan 2018 09:02:44 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CCD627F2B for ; Mon, 22 Jan 2018 09:02:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752004AbeAVJCj (ORCPT ); Mon, 22 Jan 2018 04:02:39 -0500 Received: from mail-it0-f50.google.com ([209.85.214.50]:39204 "EHLO mail-it0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753506AbeAVIxR (ORCPT ); Mon, 22 Jan 2018 03:53:17 -0500 Received: by mail-it0-f50.google.com with SMTP id 68so8926742ite.4 for ; Mon, 22 Jan 2018 00:53:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ml1AyFLr3xoRVV/xkrYW7N5e1rVc8RzcpPdtW5uDZCA=; b=EY736bPlAlR18PhZzzCeKhc6uyA5KhEVKjuFTDzLf+7+29DKWbcRT3RopuU/WiSP3R QZTzf50D3jdvrZgBq0WqSukb1pBlyLrQkpB6hq/NRuefauFqx/hojVBaxSXVGBkpHa7d zB96ExAyelFwarwm8rfh0UAXEbILmrEUC/H/8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ml1AyFLr3xoRVV/xkrYW7N5e1rVc8RzcpPdtW5uDZCA=; b=GWp5bw6/UkvZ17YiwxF1JAYaHnF1GVduGc1OtzR4NVryMcO/tY2HY1r29KmCQ2MJAo LIfp//9gOC/rSpeJiooqudQcakG9V/2uY748Nlsqjk7LtO8016MiJ/XHp+eMMVN8gzqU /eYD0FFbmM4owhN0nEnNYhNGTzEhEA8pM1/sTjxtTqQFLxHPZWpx0Ke/PziHqp6b17o0 9YMvERfdg/R/u1l5FkPaTNorEVTI4Dfe0aC6+QJ1uW6IoamhGpi4X4Q728H9PQCuuNXY UwmP9ni9eBkTtQkocRzHjjyTwhmBWWwld0c30KBHS819zr7VQXcnt87DJT6xKjKirKWr bFig== X-Gm-Message-State: AKwxytfgkzTqrjmqEC6zVbUHNU1DQLtnxWE6WX7FGFhpnXfVuHYlOjF+ ZXR2MYMvEFuHLJjlcKxrcqkdr/AV6gvEXZ/8JqbQxA== X-Google-Smtp-Source: AH8x227J29MiYlF/neR8ld9grdF787ncG+ffJ0v8vKDE+PqJ3FEgNws+f0fNn9gROOtQ4ILaaDfOEn6VUTK+k6i1iR0= X-Received: by 10.36.54.203 with SMTP id l194mr7474893itl.144.1516611196333; Mon, 22 Jan 2018 00:53:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.102.131 with HTTP; Mon, 22 Jan 2018 00:53:14 -0800 (PST) In-Reply-To: References: <20180119145303.4097-1-linus.walleij@linaro.org> From: Linus Walleij Date: Mon, 22 Jan 2018 09:53:14 +0100 Message-ID: Subject: Re: [PATCH v6] RFT: mmc: sdhci: Implement an SDHCI-specific bounce buffer To: Benjamin Beckmeyer Cc: linux-mmc , Ulf Hansson , Adrian Hunter , Pierre Ossman , =?UTF-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?= , Fabio Estevam , stable Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Jan 22, 2018 at 9:33 AM, Benjamin Beckmeyer wrote: > Hey Linus, > >> Annoying ... since the i.MX and x86 PCI version so clearly differs >> here I'm left to trial and error over the mailing list. > > I know, can I do something that it makes it easier for you? It's just how it is. Let's use mails and brains for debugging :D >> Could you try this on top of the patch? > > Built in and here is the output. I think, it's what you want, > but it doesn't work either. OK that doesn't work. Scratch that patch. What about this instead? Yours, Linus Walleij --- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 25b5e598ee6d..416e94dead4f 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -523,7 +523,7 @@ static int sdhci_pre_dma_transfer(struct sdhci_host *host, dma_sync_single_for_device(host->mmc->parent, host->bounce_addr, host->bounce_buffer_size, - DMA_TO_DEVICE); + mmc_get_dma_dir(data)); /* Just a dummy value */ sg_count = 1; } else { @@ -2422,6 +2422,12 @@ static bool sdhci_request_done(struct sdhci_host *host) data->sg_len, host->bounce_buffer, length); + } else { + dma_sync_single_for_cpu( + host->mmc->parent, + host->bounce_addr, + host->bounce_buffer_size, + mmc_get_dma_dir(data)); } } else { /* Unmap the raw data */