Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1157349pxp; Thu, 17 Mar 2022 04:13:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoECUi6isT9bTlMkRoM/rNOJCCe6hsndYgiply9L6GTjKP1hKbHrOp3VfY0Lp9uf0nGttT X-Received: by 2002:a17:90b:2242:b0:1c6:80e3:71b6 with SMTP id hk2-20020a17090b224200b001c680e371b6mr3171256pjb.152.1647515581297; Thu, 17 Mar 2022 04:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647515581; cv=none; d=google.com; s=arc-20160816; b=K8XjeEdkw4IvVqGeOO3amyFdHCjpy4KGqj+usqBRtKiWpc86wnxEXWv6l0zZ3DLNaF D8BdzrBEDj+ySeD5uluP2Dc7ahAa0DgwMnKZlGBSLUUmeqfQ6trk3/4qiaoU1diTJJ5J fDFaDKxS50O5tts4SEfkFG3/QZM362amkTFpeaAjW6w9qJdD4mU26QAHVWhM8wutzGmw lTH3Q5N4+suZo/0pQhxHAoGQblsZ3ybnerw+jCHbPDRG1aDgtW+F2E4FNbn+g7AK1r58 1GikA7lDzQhYkOam7LDzh9IMzPUqEZythd+DLffRWQgii3URkSJN5rJUQ8zIvyoDX+yy lFVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=evVQCysX6Rx7a3D/7RcWBO7GE40bsv+u7P/uPmKpk7M=; b=ZcNQz/M8ryRSLkSu5dWGSrMfUuyIIcRz5Etzqn5HozGhCc4zrDjiFsUErM8Kaubvld /v3qbNOddTwABlVJnjtirhKkcyJlf4FDP/bcOMtJfpcyNtDDoejRyx1Fb+eh8ztgYE1m gcwrIluAdIUKrXute5E6Sd4vKHtVWuJ3G5vKgeQDLfSLTFkGYxtQwxr79jaLOFoZMyMA OEbHVa5aFSi7zSbZitTUB9S6hmBh1zG8SXHNdWnj1exXeTzgDJNmbpSHoOqBdP0OhyZi CKfsc4izxVcba8rkgLtUzCk5kCGCBFLuFM4TcUp7bT4oGWAq7KLFeoehoHJ48YuRHn3B H5gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="yKC/4m1t"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020a056a00178100b004f737cdd03fsi4989123pfg.72.2022.03.17.04.12.42; Thu, 17 Mar 2022 04:13:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="yKC/4m1t"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232587AbiCQKaP (ORCPT + 99 others); Thu, 17 Mar 2022 06:30:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232580AbiCQKaN (ORCPT ); Thu, 17 Mar 2022 06:30:13 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E36B71DE6F7 for ; Thu, 17 Mar 2022 03:28:55 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id b28so8228646lfc.4 for ; Thu, 17 Mar 2022 03:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=evVQCysX6Rx7a3D/7RcWBO7GE40bsv+u7P/uPmKpk7M=; b=yKC/4m1t5uLvBlxgP+/XKZr+12jY9AhZH/djhFxd3lkoc97/kNbZTWObla3KwnoYx3 dIZdi8z4NJ+Rf6jO3NiyaYvTGBZP3cFr2WuOVqbhi+PvwOttk8Ulx5uaxbum1aiqX8zf 14jYMo1VA+grUCtwiN+UcvP0vgUaCdgZixnkAhpIpV2ryO+w+acFBdJm/eb0BnjcbYTN EA9Fe/nevFd6S7NoJ2W17oaJB2EnuNHAUdhO/kNpQ6Lfu1wfA5LQ2ugJuHuJrrz7VxNX BjTkgvJsRP3Nzu+YuH2rsYMcSkOasI+Zxy/7GZ0NnbhFX/K/rDxUOq/5Y9ZxtB/fReNu +L9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=evVQCysX6Rx7a3D/7RcWBO7GE40bsv+u7P/uPmKpk7M=; b=kj9XQkH4W7iRwIEPn4FVYPKFNdkNt3wmd0Hrs8nuIPsISiRHMDY0/MHu0YDYuuMZA7 pJ6XaNOb/qLmzrZuiMMFamZIkSkhNhU+2VApynAY5aBUnJFQSE+9PAXkellOkNVKx7mk Cx8hCv2DpA31HY/mOqbRQvgGaEqRfXOAbE+Qs8ccT/0BXxZngWkPArci9xAYhJ4hxBZQ Tp+7O9p3uaNw7/SX+dQtY8npjmkwOVkfMKxnNLK5G/cfej50wdqDP38/FeMinQoqg3kY IJ32TTRgcdcyfDxWg+XJ/Gxt423MAM1KC7jfXig4sppXLfTDruCjf4MUdulL142Zn253 PxIQ== X-Gm-Message-State: AOAM5336Tm877iQY8JOOEAyeFRwvfsINVBwyHmUUORtSWESOYdnqqPXn vUzxsLeCBNMUgJ6DeEOuiJQQ1oMM6B14Hb3t4TpscA== X-Received: by 2002:ac2:4e98:0:b0:448:3039:d170 with SMTP id o24-20020ac24e98000000b004483039d170mr2632125lfr.233.1647512934185; Thu, 17 Mar 2022 03:28:54 -0700 (PDT) MIME-Version: 1.0 References: <20220304135134.47827-1-yann.gautier@foss.st.com> <20220304135134.47827-2-yann.gautier@foss.st.com> <0bc53018-fce4-4104-fa47-6e60d2367d69@foss.st.com> <6bfade04-36b4-98c3-2796-ebeaa230f52e@foss.st.com> In-Reply-To: <6bfade04-36b4-98c3-2796-ebeaa230f52e@foss.st.com> From: Ulf Hansson Date: Thu, 17 Mar 2022 11:28:18 +0100 Message-ID: Subject: Re: [PATCH 1/3] dt-bindings: mmc: mmci: add a property to disable DMA LLI To: Yann Gautier Cc: Linus Walleij , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Alexandre Torgue , Christophe Kerello , Ludovic Barre , Maxime Coquelin , Philipp Zabel , Russell King , Marek Vasut , kernel@dh-electronics.com, Manivannan Sadhasivam , Grzegorz Szymaszek Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 17 Mar 2022 at 11:18, Yann Gautier wrote: > > On 3/17/22 11:00, Ulf Hansson wrote: > > On Tue, 15 Mar 2022 at 09:26, Yann Gautier wrote: > >> > >> On 3/14/22 23:43, Linus Walleij wrote: > >>> "On Fri, Mar 4, 2022 at 2:52 PM Yann Gautier wrote: > >>> > >>>> On STMicroelectronics variant of PL18x, the DMA Linked Lists are supported > >>>> starting from revision v2 of the peripheral. But it has limitations, > >>>> as all the buffers should be aligned on block size (except the last one). > >>>> But this cannot be guaranteed with SDIO. We should then have a property > >>>> to disable the support of LLI. > >>>> > >>>> Signed-off-by: Yann Gautier > >>> > >>> Actually I think this is present also on the ux500 variants. See: > >>> commit 2253ed4b36dc876d1598c4dab5587e537ec68c34 > >>> "mmc: mmci: Support any block sizes for ux500v2 and qcom variant" > >>> > >>> Spot the variant data "dma_power_of_2". > >>> > >>> So whatever property you add > >>> to the variant data (not in the device tree please) should > >>> be added to the ux500 variants as well, it will *VERY* likely > >>> have a problem with LLI elements not being a power of 2 > >>> as it is the ancestor of later STMicro variants. > >>> > >>> It might actually be the reason for some annoying WiFi error > >>> messages I have seen :/ > >>> > >>> Yours, > >>> Linus Walleij > >> > >> Hi Linus, > >> > >> The STM32 variant uses an internal DMA, and the DMA functions are in its > >> dedicated file. So I was planning to do the same as what is done in > >> meson-gx-mmc.c: using a bounce buffer to copy from/to in case DMA > >> constraints are not fulfilled. Not sure it can help for Ux500. > > > > Hi Ulf, > > > We already have a bounce buffer in mmci_pio_read(), but we need one in > > mmc_pio_write() too, which hasn't been implemented yet. > > The idea is to keep using our internal DMA, and not switch to pio mode. Okay, but doesn't that become awfully inefficient, especially if we end up with several smaller sg-list-elements. The switch to pio would only be temporary for the particular request that has "bogus" buffers. > > > > >> > >> Ulf, before I send my new series (although it is not ready yet), would > >> you be OK with the bounce buffer idea? > > > > Yes, that works for me. > I have patches almost ready, I'll send that soon. Okay! > > > > > On the other hand, it would be even better if we could specify the > > buffer limitations per mmc host instance, so upper layers (SDIO func > > drivers) could conform to these - and use better buffers, to achieve a > > better performance. > > We've seen things that could be improved in the wifi driver. I'll check > what could be done. Great! Kind regards Uffe