Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9639503imu; Wed, 5 Dec 2018 08:01:57 -0800 (PST) X-Google-Smtp-Source: AFSGD/WloHTRtmYMThF4jtAMLYy1CBLa9fYoGM1p4iMtmvawWptAOWSjxeh0izIbj+WtQALejjqh X-Received: by 2002:a63:9402:: with SMTP id m2mr20140540pge.93.1544025717271; Wed, 05 Dec 2018 08:01:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544025717; cv=none; d=google.com; s=arc-20160816; b=S78isO3jTi7/HrT8UaO4UDhgtk+1hyBd/R7h6baZF3M98j/rtGt+EsOOmAig7XvSs3 eq19WBOTcOeyT5S91fbdHMmsHSOT1rhwHOODT5PDyKzxjvDA1rwqsikXnu8c04Sayi+C JRiOhvjBHenrlL+GtEYWdK0e7ciF4ji09RYWnC9iwFxDqMW7/6PmjhCCB7rXwjO6qCrM MAnaRwwM55hErgi1+ch+vsgfnIfseeYWcb8+ruRA9BHs7XOstK7mPOw02cwPAr7Uf3I0 +Lxjj2q14k18N7Pyx4U4GmGn5PGUuw/sY5fiaApNMZ0CvIr6MuHilXnvOMGda3KA98TV aI6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=34tlsNenydswVdInkFJPloQ35cT7ZldsEc73mKtNQ/g=; b=cCLjs6V66/RlXYNiepNraNmbn44BhVqcRn5iXbmoJR/uUprg3811mN2X+pzgmdkdY1 Tp0Kxq11OltjAIgnzVKv+msoo3Ohm5UPJkj4A1XaWfygTEQVn9SFQcvuOxf0BoFg3c48 /KKOU1Dg8y+83IdvksRCbi1wgPxFnO7XMQ3fxBz1HoOUDQ4kiHnyYEH+W+Y76G7noVh1 +awnXRPv+X5bhabv5sCiOh/ESGF1efSTZzQOtfrC9vHdyRLlZPQMKEbtNcPJVR14JCXG W2ukSKxQD3tsMI8T5ev3CdT35CODg1W3ops8eqilOc6vnwl+QI2RipCqa/2jPzqBB65t J7Vg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si20187718plt.68.2018.12.05.08.01.40; Wed, 05 Dec 2018 08:01:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728353AbeLEQAy (ORCPT + 99 others); Wed, 5 Dec 2018 11:00:54 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:12069 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728341AbeLEQAw (ORCPT ); Wed, 5 Dec 2018 11:00:52 -0500 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id wB5G0F8P011959; Wed, 5 Dec 2018 17:00:30 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2p3w2rxvna-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 05 Dec 2018 17:00:30 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A4AFB31; Wed, 5 Dec 2018 16:00:29 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node1.st.com [10.75.127.16]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 71A7151E2; Wed, 5 Dec 2018 16:00:29 +0000 (GMT) Received: from [10.48.0.237] (10.75.127.50) by SFHDAG6NODE1.st.com (10.75.127.16) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 5 Dec 2018 17:00:28 +0100 Subject: Re: [PATCH V2 1/2] mmc: mmci: send stop command if sbc error issue To: Ulf Hansson CC: Rob Herring , Srinivas Kandagatla , Maxime Coquelin , Alexandre Torgue , Linux ARM , Linux Kernel Mailing List , DTML , "linux-mmc@vger.kernel.org" , References: <1541583041-17461-1-git-send-email-ludovic.Barre@st.com> <1541583041-17461-2-git-send-email-ludovic.Barre@st.com> From: Ludovic BARRE Message-ID: <4d5b86fa-aa89-5b19-1fee-ecdbc57f6d20@st.com> Date: Wed, 5 Dec 2018 17:00:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG7NODE2.st.com (10.75.127.20) To SFHDAG6NODE1.st.com (10.75.127.16) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-12-05_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/5/18 3:23 PM, Ulf Hansson wrote: > 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. Ulf, very thanks for the tests, and sorry for my busy status. I will send as soon as possible the 2/2 with your recommendation (I will more spare time for upstream) > > [...] > > 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 >