From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14DB4C04AAF for ; Tue, 21 May 2019 07:56:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D29032173C for ; Tue, 21 May 2019 07:56:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="F5EyexQa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727193AbfEUH4s (ORCPT ); Tue, 21 May 2019 03:56:48 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:43877 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727160AbfEUH4r (ORCPT ); Tue, 21 May 2019 03:56:47 -0400 Received: by mail-vs1-f66.google.com with SMTP id d128so10569871vsc.10 for ; Tue, 21 May 2019 00:56:46 -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=FtQxjrgLrdOuTSlhu4LkRzwqAzUSzK8W0aKxAbgs+38=; b=F5EyexQaa0bp0wPObS0GOV2fVBnRHWOPre4mgWtyFd+AZ2jy1wnr/0x0uDEiuWGeJ2 x54itVgHoIeRfX64D+f8f1ov2JNjm4z9MqJRfzHEdo1QXpZz7GslDUsVAFoSyLagjPrT ugwOXDGmwSI5O4Hf9N/TIwdjo3inNrzlsS7ATtZiBJilOcfV2RKJX2F3yjhL3wh0pn7z 1gJIeiyPYxdIs8kS2q6MkhiVdjsS69JS3nx6xEQ46SMXWxpeaz+KJrawK4ANuLNH/Syy x0UMQXrOgL+Y83N/WwWNWxek6DqXC6/mKTFZlj4O9kk3v/z5QlEKUir+Jb1IHzUGMHHJ /RsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FtQxjrgLrdOuTSlhu4LkRzwqAzUSzK8W0aKxAbgs+38=; b=IYj2D/vDHXPLsy2fzOWhaaKaZHhhQvcSqONyErtl45tcN5IFVCDyqXcnbOkxb/e8nv xwnXtFcc6uzggZiZrfGG8tvo2HM1BzWr76X08Ir9yUYrAwsF+v/5TbY3SiWma/Xrm4EH 6slXMloZ3ataI9BJidAhCNSXQwoieOopmfKET8JPbge1ZELLj5O03INWE/irzVyvJ7C7 2Jh/NZgGVFH1//XmaaaPvrbT+Bj3Y5a9qwkQX0epX7Rcx+JkCBbEHknYvT3l5MAR9EKV ffk5+JWTMpRgoELZTB+B2B7XipgNkk5XAUn9XQfuc3xZjWVQlt3Z+T4GZmqLnloyULiG FhqQ== X-Gm-Message-State: APjAAAXNB75irFIZA7mHLyFyHEw8SusAJkc0zu8jX6PMhSYZQZHMcqnT 1AHE5SdexG3P3lAZwgnW1eYFebWgqiFBOMiOSiL9pw== X-Google-Smtp-Source: APXvYqxy+vnW+gDM9sIawmZ1xfypyZ+973iUhEqyUgGr8DtqjIiEFy8/ahRDodOxF5dcpTZCuXdm3fwUb+Nvl/aPNSQ= X-Received: by 2002:a67:3046:: with SMTP id w67mr21968255vsw.165.1558425406507; Tue, 21 May 2019 00:56:46 -0700 (PDT) MIME-Version: 1.0 References: <1556264798-18540-1-git-send-email-ludovic.Barre@st.com> <74b91eb4-e5a3-38b2-f732-29cdd058eb6a@st.com> In-Reply-To: From: Ulf Hansson Date: Tue, 21 May 2019 09:56:09 +0200 Message-ID: Subject: Re: [PATCH V2 0/5] mmc: mmci: add busy detect for stm32 sdmmc variant To: Ludovic BARRE Cc: Rob Herring , Srinivas Kandagatla , Maxime Coquelin , Alexandre Torgue , Linux ARM , Linux Kernel Mailing List , DTML , "linux-mmc@vger.kernel.org" , linux-stm32@st-md-mailman.stormreply.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 21 May 2019 at 09:38, Ludovic BARRE wrote: > > hi Ulf > > Just a "gentleman ping" about the rest of series. > "mmc: mmci: add busy detect for stm32 sdmmc variant" Thanks! It's been a busy period and I am currently traveling. My plan is to look at in detail beginning of next week when get back home. I hope that's okay. Kind regards Uffe > > Regards > Ludo > > On 5/3/19 3:29 PM, Ulf Hansson wrote: > > On Tue, 30 Apr 2019 at 14:06, Ludovic BARRE wrote: > >> > >> > >> > >> On 4/30/19 1:13 PM, Ulf Hansson wrote: > >>> On Fri, 26 Apr 2019 at 09:46, Ludovic Barre wrote: > >>>> > >>>> From: Ludovic Barre > >>>> > >>>> This patch series adds busy detect for stm32 sdmmc variant. > >>>> Some adaptations are required: > >>>> -Avoid to check and poll busy status when is not expected. > >>>> -Clear busy status bit if busy_detect_flag and busy_detect_mask are > >>>> different. > >>>> -Add hardware busy timeout with MMCIDATATIMER register. > >>>> > >>>> V2: > >>>> -mmci_cmd_irq cleanup in separate patch. > >>>> -simplify the busy_detect_flag exclude > >>>> -replace sdmmc specific comment in > >>>> "mmc: mmci: avoid fake busy polling in mmci_irq" > >>>> to focus on common behavior > >>>> > >>>> Ludovic Barre (5): > >>>> mmc: mmci: cleanup mmci_cmd_irq for busy detect feature > >>>> mmc: mmci: avoid fake busy polling in mmci_irq > >>>> mmc: mmci: fix clear of busy detect status > >>>> mmc: mmci: add hardware busy timeout feature > >>>> mmc: mmci: add busy detect for stm32 sdmmc variant > >>>> > >>>> drivers/mmc/host/mmci.c | 61 ++++++++++++++++++++++++++++++++++++++----------- > >>>> drivers/mmc/host/mmci.h | 3 +++ > >>>> 2 files changed, 51 insertions(+), 13 deletions(-) > >>>> > >>>> -- > >>>> 2.7.4 > >>>> > >>> > >>> Ludovic, just wanted to let you know that I am reviewing and testing > >>> this series. > >>> > >>> However, while running some tests on Ux500 for validating the busy > >>> detection code, even without your series applied, I encounter some odd > >>> behaviors. I am looking into the problem to understand better and will > >>> let you know as soon as I have some more data to share. > >> > >> Oops, don't hesitate to share your status, if I could help. > > > > Thanks! Good and bad news here, then. > > > > I now understand what is going on - and there is certainly room for > > improvements here, but more importantly the actual mmci busy detection > > works as expected. > > > > When it comes to improvements, the main issue I have found is how we > > treat DATA WRITES. In many cases we simply don't use the HW busy > > detection at all, but instead rely on the mmc core to send CMD13 in a > > loop to poll. Well, then if the polling would have consisted of a > > couple of CMD13s that wouldn't be an issue, but my observations is > > rather that the numbers of CMD13 sent to poll is in the range or > > hundreds/thousands - per each WRITE request! > > > > I am going to send a patch (or two) that improves the behavior. It > > might even involve changing parts in core layer, not sure how the end > > result will look like yet. > > > > In any case, I have applied patch 1 and patch2 for next, as the tests > > turned out well at my side. I also took the liberty of updating some > > of the comments/changelogs, please have look and tell if there is > > something you want to change. > > > > I will continue with the rest of series next week. > > > > Kind regards > > Uffe > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49D3AC04AAF for ; Tue, 21 May 2019 07:56:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1E68021773 for ; Tue, 21 May 2019 07:56:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MSaNUXye"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="F5EyexQa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E68021773 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H69Hki8qufjPeiRPbxgtDwSY17uuMTQmsrpAo6cRCLs=; b=MSaNUXyePOYvir Z/u5uzN05lcRTSL2niDwhI91tOmkUJdqgqa/Yi40KryS/7CbV94qgA8/HDPxDu76dj24r3wZZZ9c8 E56+Id0UTs9L2a4SKmWoMMtmmhMdHUPCPaG/WIY93Z9/Dc4mWCTHtwKDmAEHHD8pCRG/tV1Xg9EUh 5RhwaGnvemVJwJ3oYq5BiD8xsR24KojUXm5f6Zyxh4mFeu4E0tyXmK8ziYxtyM5sa7DnCfqWP479R T97fY4aXK5pm9lD7GRorQGWCKj9x0trYYny3XAMMKXjz2UiKgnzseyVuhcybcp4ba50ActcrkIwrj d6Xqn87rvn5wes95gCbQ==; 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 1hSzdk-0002Eo-Ec; Tue, 21 May 2019 07:56:52 +0000 Received: from mail-vs1-xe43.google.com ([2607:f8b0:4864:20::e43]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSzdg-0002DV-9f for linux-arm-kernel@lists.infradead.org; Tue, 21 May 2019 07:56:49 +0000 Received: by mail-vs1-xe43.google.com with SMTP id k187so3605238vsk.12 for ; Tue, 21 May 2019 00:56:47 -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=FtQxjrgLrdOuTSlhu4LkRzwqAzUSzK8W0aKxAbgs+38=; b=F5EyexQaa0bp0wPObS0GOV2fVBnRHWOPre4mgWtyFd+AZ2jy1wnr/0x0uDEiuWGeJ2 x54itVgHoIeRfX64D+f8f1ov2JNjm4z9MqJRfzHEdo1QXpZz7GslDUsVAFoSyLagjPrT ugwOXDGmwSI5O4Hf9N/TIwdjo3inNrzlsS7ATtZiBJilOcfV2RKJX2F3yjhL3wh0pn7z 1gJIeiyPYxdIs8kS2q6MkhiVdjsS69JS3nx6xEQ46SMXWxpeaz+KJrawK4ANuLNH/Syy x0UMQXrOgL+Y83N/WwWNWxek6DqXC6/mKTFZlj4O9kk3v/z5QlEKUir+Jb1IHzUGMHHJ /RsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FtQxjrgLrdOuTSlhu4LkRzwqAzUSzK8W0aKxAbgs+38=; b=dT1A0DgI6oeUqQ+CrON1ogP7bVq8QSb3shIAW4fg1A3UWy3PLMGAAMajqs2FXEq9QX eMALiaMpkYESUYNWx+JIbFag+/LpGGMvvtFig/ITdGpKYcYf87P3AhY9VdPGgkInncsL YJ71UbdlSku/Dj89kYt/6xM72ptpukVpbKAASnkOseOhYW4Xb9WZfkUXUmibaMubxOOD 6MI0Ubz1NXm0XyCW/0DAi7fShAZLNrWaOT9AyHx6zpFdNGNgw+1rtJ7TxEqzHjesA26P OLUhWGqOi36RcmgXv3Z/4ByL1N6jfh0utPm72A2zaWZyUpqxsNDAHsAjYcLJZv8iNDQO 9m2A== X-Gm-Message-State: APjAAAVt5oPc4v1bpMGjjAtS/PkXfRxLE/UApGhrYR/d6NXEmbaXis+a 7KLwGcvGbn6cL2CMfbNBSMEU5RyXCMJGrruYke41JamYkA0= X-Google-Smtp-Source: APXvYqxy+vnW+gDM9sIawmZ1xfypyZ+973iUhEqyUgGr8DtqjIiEFy8/ahRDodOxF5dcpTZCuXdm3fwUb+Nvl/aPNSQ= X-Received: by 2002:a67:3046:: with SMTP id w67mr21968255vsw.165.1558425406507; Tue, 21 May 2019 00:56:46 -0700 (PDT) MIME-Version: 1.0 References: <1556264798-18540-1-git-send-email-ludovic.Barre@st.com> <74b91eb4-e5a3-38b2-f732-29cdd058eb6a@st.com> In-Reply-To: From: Ulf Hansson Date: Tue, 21 May 2019 09:56:09 +0200 Message-ID: Subject: Re: [PATCH V2 0/5] mmc: mmci: add busy detect for stm32 sdmmc variant To: Ludovic BARRE X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190521_005648_343529_51ED4175 X-CRM114-Status: GOOD ( 24.65 ) 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: DTML , Alexandre Torgue , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , Rob Herring , Srinivas Kandagatla , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 21 May 2019 at 09:38, Ludovic BARRE wrote: > > hi Ulf > > Just a "gentleman ping" about the rest of series. > "mmc: mmci: add busy detect for stm32 sdmmc variant" Thanks! It's been a busy period and I am currently traveling. My plan is to look at in detail beginning of next week when get back home. I hope that's okay. Kind regards Uffe > > Regards > Ludo > > On 5/3/19 3:29 PM, Ulf Hansson wrote: > > On Tue, 30 Apr 2019 at 14:06, Ludovic BARRE wrote: > >> > >> > >> > >> On 4/30/19 1:13 PM, Ulf Hansson wrote: > >>> On Fri, 26 Apr 2019 at 09:46, Ludovic Barre wrote: > >>>> > >>>> From: Ludovic Barre > >>>> > >>>> This patch series adds busy detect for stm32 sdmmc variant. > >>>> Some adaptations are required: > >>>> -Avoid to check and poll busy status when is not expected. > >>>> -Clear busy status bit if busy_detect_flag and busy_detect_mask are > >>>> different. > >>>> -Add hardware busy timeout with MMCIDATATIMER register. > >>>> > >>>> V2: > >>>> -mmci_cmd_irq cleanup in separate patch. > >>>> -simplify the busy_detect_flag exclude > >>>> -replace sdmmc specific comment in > >>>> "mmc: mmci: avoid fake busy polling in mmci_irq" > >>>> to focus on common behavior > >>>> > >>>> Ludovic Barre (5): > >>>> mmc: mmci: cleanup mmci_cmd_irq for busy detect feature > >>>> mmc: mmci: avoid fake busy polling in mmci_irq > >>>> mmc: mmci: fix clear of busy detect status > >>>> mmc: mmci: add hardware busy timeout feature > >>>> mmc: mmci: add busy detect for stm32 sdmmc variant > >>>> > >>>> drivers/mmc/host/mmci.c | 61 ++++++++++++++++++++++++++++++++++++++----------- > >>>> drivers/mmc/host/mmci.h | 3 +++ > >>>> 2 files changed, 51 insertions(+), 13 deletions(-) > >>>> > >>>> -- > >>>> 2.7.4 > >>>> > >>> > >>> Ludovic, just wanted to let you know that I am reviewing and testing > >>> this series. > >>> > >>> However, while running some tests on Ux500 for validating the busy > >>> detection code, even without your series applied, I encounter some odd > >>> behaviors. I am looking into the problem to understand better and will > >>> let you know as soon as I have some more data to share. > >> > >> Oops, don't hesitate to share your status, if I could help. > > > > Thanks! Good and bad news here, then. > > > > I now understand what is going on - and there is certainly room for > > improvements here, but more importantly the actual mmci busy detection > > works as expected. > > > > When it comes to improvements, the main issue I have found is how we > > treat DATA WRITES. In many cases we simply don't use the HW busy > > detection at all, but instead rely on the mmc core to send CMD13 in a > > loop to poll. Well, then if the polling would have consisted of a > > couple of CMD13s that wouldn't be an issue, but my observations is > > rather that the numbers of CMD13 sent to poll is in the range or > > hundreds/thousands - per each WRITE request! > > > > I am going to send a patch (or two) that improves the behavior. It > > might even involve changing parts in core layer, not sure how the end > > result will look like yet. > > > > In any case, I have applied patch 1 and patch2 for next, as the tests > > turned out well at my side. I also took the liberty of updating some > > of the comments/changelogs, please have look and tell if there is > > something you want to change. > > > > I will continue with the rest of series next week. > > > > Kind regards > > Uffe > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel