Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9536061imu; Wed, 5 Dec 2018 06:25:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/VmlQcnQfamtZvKIB1Kebp5n73ewu/xnFUZEHVwQCNgnQLV9pgvpYoROsetE6OviSDFRtJS X-Received: by 2002:a63:c10f:: with SMTP id w15mr20366904pgf.199.1544019920221; Wed, 05 Dec 2018 06:25:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544019920; cv=none; d=google.com; s=arc-20160816; b=gbb3J2OKca0FKf6wvnKcGcSdcSu1qPomLj3t368ESgK0LnQ6S3TKTqWAQ63nVjJhJq EET5EoYSEWJCSgALejNhJiiwhVYEc89O55sxkcDhpAfTDF9NWqja2TVQMo1WskLWjPGV u5mPj7ThLXirNRo7iewvwSUSN5ZPiBLnpL6hrIG+yQvELZs5GuIpsyyKQjBzneSLH32G T+wAfiNkOs+CkaR9fnrpkhJ8FjcK3Vev547tmJTa4aTgh340F3DLxQ9jmPlZd6VBXAri aFKb0HBJhXLmIeiBIOf7kuNaqvj+sSbGh1O3LD+ndji8FqyYBt986g8JnbrfPptSi3Y+ FAcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=W9/iKsVpde2V2Et7J3sIMYUKDqYSqXKRQQWbaSLSum8=; b=E7TC78lQoWvHMgmDLqjSxgHuM2xgozlKY7vpm+FcBv7TTvk/KLZwZ44fYyZhqQaYGC J+u9jw0BRHiLa34Tu41LY0mc4Wmz1K2uW96v9JCXXzR8OfQhUkVZwwuXj11xmQVrumxL cHLftFFaR84GyDIMQHTqy/STTs4k25Ji5N8YvwDOLedawZ5P96tQBcq2Mu2Uw2Gp+Z8R NEYkvlzeS2X5vmvssJIE6GV9xoOO+yE6xQ50vSTQac8GRpkV6rcvvvQsAFp+qY5fDG5p xvdKpO2hjpWVV+793+oCNK+4qJJCSlkNgSeAvz8fkH4CmhriGSzI5bu76rNFbWfByg/e GNWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XQRmxA1p; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j35si16726568pgl.223.2018.12.05.06.25.04; Wed, 05 Dec 2018 06:25:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XQRmxA1p; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727680AbeLEOYL (ORCPT + 99 others); Wed, 5 Dec 2018 09:24:11 -0500 Received: from mail-vs1-f67.google.com ([209.85.217.67]:43679 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727564AbeLEOYL (ORCPT ); Wed, 5 Dec 2018 09:24:11 -0500 Received: by mail-vs1-f67.google.com with SMTP id x1so12135697vsc.10 for ; Wed, 05 Dec 2018 06:24:10 -0800 (PST) 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=W9/iKsVpde2V2Et7J3sIMYUKDqYSqXKRQQWbaSLSum8=; b=XQRmxA1pB20uL2/ElRKIEU9uQiKxLPf07Dprt11PDi8AgWCo74HfPmRVFNCBibgsDz r4aL+QyG/9dC/itTox7LuRJc5YhSo2il3n9fOteJatEN3/uzv3FgTOqsi0N3WIBZQPf1 47+405KoYxiL1QfppcpXWTAu/PrOKL1hoqzNY= 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=W9/iKsVpde2V2Et7J3sIMYUKDqYSqXKRQQWbaSLSum8=; b=VHmQZ0a6abeW0pQqvmkPEQWwBbNexLxsk+F1WgUZwjqXnxY+NfKx7ayLcPY6Hx4/eS dqJXttu4xREeA2kgVN5yfKQqju3zSaJkk2eU1RtNgqIHz/wNUXVN1kie8Z73SrB0uvS3 lvchKYWnIDrEWZJ1SqJfh9dEooEPt62SyacnEzC/itMfIYwp7GEQzHayq5JbdYKU+eym QfNnB5NG9vqruH+aXxheBNp1oifxkj0bnWWhSTk9C46Hj999eN2K+R4H94/B7rCUxhK7 36LaHB6THX83EeWRq4QmZ+cSy9NPHBn6w6ppBNZYAl11PRa7IonoVYCwKkfAv9KzFkZm tRvA== X-Gm-Message-State: AA+aEWZc4A6d+sjUu3x886+mMMseB3kFFMsO/Bl8kmy1+IIsxYPI/i0B 9kk/n0aQOPxqlc0lAOsTrUAhtFIVu8kncQ3XeqNczI0D X-Received: by 2002:a67:7685:: with SMTP id r127mr10762107vsc.35.1544019849310; Wed, 05 Dec 2018 06:24:09 -0800 (PST) MIME-Version: 1.0 References: <1541583041-17461-1-git-send-email-ludovic.Barre@st.com> <1541583041-17461-2-git-send-email-ludovic.Barre@st.com> In-Reply-To: From: Ulf Hansson Date: Wed, 5 Dec 2018 15:23:33 +0100 Message-ID: Subject: Re: [PATCH V2 1/2] mmc: mmci: send stop command if sbc error issue 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, 20 Nov 2018 at 10:42, Ulf Hansson wrote: > > On 7 November 2018 at 10:30, Ludovic Barre wrote: > > From: Ludovic Barre > > > > Refer to "4.15 set block count command" of sd specification: > > Host needs to issue CMD12 if any error is detected in > > the CMD18 and CMD25 operations. > > > > In sbc case, the data->stop is fill by framework. > > > > Signed-off-by: Ludovic Barre > > --- > > drivers/mmc/host/mmci.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c > > index 82bab35..13fa640 100644 > > --- a/drivers/mmc/host/mmci.c > > +++ b/drivers/mmc/host/mmci.c > > @@ -1190,11 +1190,10 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data, > > /* The error clause is handled above, success! */ > > data->bytes_xfered = data->blksz * data->blocks; > > > > - if (!data->stop || host->mrq->sbc) { > > + if (!data->stop || (host->mrq->sbc && !data->error)) > > mmci_request_end(host, data->mrq); > > - } else { > > + else > > mmci_start_command(host, data->stop, 0); > > This looks correct to me! > > Although, just wanted to double check that you tested this for a case > where we have host->mrq->sbc set and got an error in data->error? I > guess it can be tricky, so I was thinking of manually trying to > instruct the code, to set an error in data->error, at some point to > trigger this code. That would at least give us some confidence that it > works as expected. I did some manual tests to trigger the error path. As far as I can tell, it works as expected and I observes that the core is able to recover and re-send the request. [...] So, I have added my tested-by tag and applied this for next. Thanks! In regards to patch2/2 I am awaiting your update. Kind regards Uffe