From patchwork Tue Mar 14 10:09:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 9622855 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D8BDF60244 for ; Tue, 14 Mar 2017 10:16:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF1B828533 for ; Tue, 14 Mar 2017 10:16:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B43A628569; Tue, 14 Mar 2017 10:16:07 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D32DF28533 for ; Tue, 14 Mar 2017 10:16:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750829AbdCNKQD (ORCPT ); Tue, 14 Mar 2017 06:16:03 -0400 Received: from sauhun.de ([88.99.104.3]:56229 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796AbdCNKQB (ORCPT ); Tue, 14 Mar 2017 06:16:01 -0400 Received: from localhost (p54B33BE9.dip0.t-ipconnect.de [84.179.59.233]) by pokefinder.org (Postfix) with ESMTPSA id AFF882C039F; Tue, 14 Mar 2017 11:09:30 +0100 (CET) From: Wolfram Sang To: linux-mmc@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Simon Horman , Yoshihiro Shimoda , Wolfram Sang , Simon Horman Subject: [PATCH v3 4/4] mmc: host: tmio: fill in response from auto cmd12 Date: Tue, 14 Mar 2017 11:09:19 +0100 Message-Id: <20170314100919.25401-5-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170314100919.25401-1-wsa+renesas@sang-engineering.com> References: <20170314100919.25401-1-wsa+renesas@sang-engineering.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP After we received the dataend interrupt, R1 response register carries the value from the automatically generated stop command. Report that info back to the MMC block layer, so we will be notified in case of e.g. ECC errors which happened during the last transfer. Reviewed-by: Simon Horman Tested-by: Yoshihiro Shimoda Signed-off-by: Wolfram Sang --- drivers/mmc/host/tmio_mmc_pio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index b47dd9195fe3fe..a08db28b0100d6 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -557,6 +557,9 @@ void tmio_mmc_do_data_irq(struct tmio_mmc_host *host) dev_err(&host->pdev->dev, "unsupported stop: CMD%u,0x%x. We did CMD12,0\n", stop->opcode, stop->arg); + /* fill in response from auto CMD12 */ + stop->resp[0] = sd_ctrl_read16_and_16_as_32(host, CTL_RESPONSE); + sd_ctrl_write16(host, CTL_STOP_INTERNAL_ACTION, 0); }