From patchwork Wed Nov 7 09:30:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ludovic BARRE X-Patchwork-Id: 10672017 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B02D413BF for ; Wed, 7 Nov 2018 09:31:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FB922B955 for ; Wed, 7 Nov 2018 09:31:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 940DD2B94C; Wed, 7 Nov 2018 09:31:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EADDC2B94C for ; Wed, 7 Nov 2018 09:31:12 +0000 (UTC) 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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ItFwDLPaY7OccTH4iCxr3UIHdGZBzSVrsYvXCyuDK5g=; b=sK856oJunOjujB JETJltu6gA04wO1ZxfAU41CNrvscG37Xo4+v3PP9SpmTlDdjD68P6EZaqSPSGNHKPGTpHwW87QZLN 66+HpZOCpVkXIymBOuTAWM8QioVNt6UBZlY2feXXNLdi33GmuboJed/fKqIHHKLFr5zUeTw6kizcY x263j6w+5gy1vVKyJ2N8OQWd7DMM4TstsXslcQzaWTRtuRWi4fb8ed38Zy8BQ169GO7Ye/VdgPCDu 4PIT2ybQnj103gf5eh6/xLLaoY44KbyFclnph/5efW+QhhFUM6stgNmZBT1r/9AJP0DSarO/UXFrf KAmvaERd2jfg4eAh6JUw==; 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 1gKKB4-0003Wg-Et; Wed, 07 Nov 2018 09:31:10 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKKB2-0003WG-Hv for linux-arm-kernel@bombadil.infradead.org; Wed, 07 Nov 2018 09:31:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kpyhnXVTIieqrFPNzOzEDs44bCWT4wXp9n+EECHYm5U=; b=mPQNY8nLFqnkcKYoSNmHi/fpN dybrdS1zI6F6P5FePS97ANTXn3+Mq0h96drZVNTgL8Lr41QoOFunJH40JU4GPSUrV2GNQg/12vfIG JvrFL0y0hViry240S1D/mCjTUwtC9jJKY898A84yFm8NxYs7IhJYVmFtWXZNfyk8SRaTtIJA/2lmQ //XKhSiMQgx0PKN44cnxOtl9QoTGj5Pxq7RdnHdDgGvENji7BEyZ30zADCLISqB5VNfshDMVHFCh7 UGOG969nP5Mc83Eiik4GyqF3mvfcKsLuvOuGvnfzEJZQw5oKpesVTe1EHNhZWyIwWY5zLB+ZqDvrv 6is+im+zw==; Received: from mx07-00178001.pphosted.com ([62.209.51.94]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKKAy-0001e7-1x for linux-arm-kernel@lists.infradead.org; Wed, 07 Nov 2018 09:31:05 +0000 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id wA79TDoa008097; Wed, 7 Nov 2018 10:30:45 +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 2nh211m1ge-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 07 Nov 2018 10:30:45 +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 1387631; Wed, 7 Nov 2018 09:30:44 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DFD282C11; Wed, 7 Nov 2018 09:30:43 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 7 Nov 2018 10:30:43 +0100 Received: from lmecxl0923.lme.st.com (10.48.0.237) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 7 Nov 2018 10:30:43 +0100 From: Ludovic Barre To: Ulf Hansson , Rob Herring Subject: [PATCH V2 1/2] mmc: mmci: send stop command if sbc error issue Date: Wed, 7 Nov 2018 10:30:40 +0100 Message-ID: <1541583041-17461-2-git-send-email-ludovic.Barre@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1541583041-17461-1-git-send-email-ludovic.Barre@st.com> References: <1541583041-17461-1-git-send-email-ludovic.Barre@st.com> MIME-Version: 1.0 X-Originating-IP: [10.48.0.237] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-07_07:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181107_093104_135018_180EA2DB X-CRM114-Status: GOOD ( 14.05 ) 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: devicetree@vger.kernel.org, Alexandre Torgue , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, srinivas.kandagatla@linaro.org, Ludovic Barre , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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); - } } }