Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9629817imu; Wed, 5 Dec 2018 07:52:26 -0800 (PST) X-Google-Smtp-Source: AFSGD/XZ+LNdqWtwZpB5KYqanWTbeEHSLhf6hplGXsYggIZGzzVfb95y+Kl94H4oPsn2NA6N2Un2 X-Received: by 2002:a62:7086:: with SMTP id l128mr24751564pfc.68.1544025146524; Wed, 05 Dec 2018 07:52:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544025146; cv=none; d=google.com; s=arc-20160816; b=HxSaCIJMh6nTrX08zyaDcYsA8ZSpP6XkY3fXnnIDObY3dSj2YNaP3tO2y/9QIVxbb0 G9LVlCL0+2RMQzqFUL4sRXdx+Qy5BTOBlpuzg0ALDoRoiULqzDpZiKEvGg50FTceyStr fzL1rkm/wbkbouAGwacoYEdMCIl4sIGiGI0kV8SWQhougUGznNwHHH45QiMHJ9mwKCge n/atH5Yux6ziBg4l+Y1b7VRBigSvrQ7U07SKgBO9IPkufKA5Qmb9ZBCHmhSaHB/MrKfd ICSaylMP6z0KC9Su9JKOoE9TyrpO6EmyOmtxM2bZ6XZi9I6Bgp3grLo2eEjATt5WXW6K GfYQ== 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=ZOmO3hQDsjanThggABOwvWpxCg4m/3GOOxHxnZlYIS8=; b=rovTU9t5mJgc8EoX7PgA5k6tg7Rcm7LYlY+r5JL6GPG6G+aHvj7KO3mlPR7Ru9ozUr mXw6UR++3F+rGn7K8jrVqw7dyuGjgylNR3GRTdlTQDWLlXXrcCNtsJKCPx/3yOl4jRyB GnmdGC9vWO1yygmG/JfLPIdZ8DtFK73f6bJfYk8tU0z6eOb4kkXIdKEhtGin/mg08ogM kycmK+zzXTDXkBWSyTKxaDYYN/LUlJr+9gCT0h4weBQrOCsPbcNcy/O9uP5cRxSCLe+n +DArZvtewXQoMnw5JAKhFl+22Yn/24vdvTZzR0RW6UtWGLjC68uOaDnnfQDnsrek8Csh kbHQ== 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 z5si18070131pgu.19.2018.12.05.07.52.11; Wed, 05 Dec 2018 07:52:26 -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 S1728280AbeLEPuQ (ORCPT + 99 others); Wed, 5 Dec 2018 10:50:16 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:24566 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727103AbeLEPuO (ORCPT ); Wed, 5 Dec 2018 10:50:14 -0500 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id wB5FkmHQ001926; Wed, 5 Dec 2018 16:49:46 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2p53mb64tj-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 05 Dec 2018 16:49:46 +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 D801F31; Wed, 5 Dec 2018 15:49:45 +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 AE7CA518E; Wed, 5 Dec 2018 15:49:45 +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 16:49:44 +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: Date: Wed, 5 Dec 2018 16:49:44 +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: SFHDAG8NODE1.st.com (10.75.127.22) 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. > > [...] > > 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 >