From patchwork Wed Mar 22 21:33:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9640103 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 2111D60327 for ; Wed, 22 Mar 2017 21:34:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12BD72521E for ; Wed, 22 Mar 2017 21:34:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07B3C262F2; Wed, 22 Mar 2017 21:34:37 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 8C7202521E for ; Wed, 22 Mar 2017 21:34:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753768AbdCVVef (ORCPT ); Wed, 22 Mar 2017 17:34:35 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34906 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753671AbdCVVeR (ORCPT ); Wed, 22 Mar 2017 17:34:17 -0400 Received: by mail-wm0-f65.google.com with SMTP id z133so13143718wmb.2 for ; Wed, 22 Mar 2017 14:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=c85g0w3p28yovA0+im19ixTcXGGHP3VLAJbugqC+MPw=; b=Mg4wMEAhBrignCGQ0oslDrW0TGHjYPPk8X1K1l1001cOJ5P0jsQkk62XJ/ULpwr4Ke BZXV1JUsaDxw/bt6cg2qAUF6TyfONq2wurC1OQ3XtDp/qW7pK/ltaXWhISnYVW0ac7PE 13YDWiFLE741pzo2lH3LCzuOKqsNqe+9vBugWcqW9BIE5ciHGS5pQ52vg+HSNv+CH4G/ GL6fk3U9MlEO2R2eWYb2JPT+n9rHpCktic+Xp6hXiPbJu4fiSeqAbMzmaLa44Ude8HJB ZDoJ10EqCeWGx4DntJKrLFqeUzradz1vkh5lxSfNfXTMCXKgaw73a/IvlpE0myfUI3Ct mMYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=c85g0w3p28yovA0+im19ixTcXGGHP3VLAJbugqC+MPw=; b=iHF34uiDdCT6vrLLAIKw8bH38X8RkPwxzcT4/KDipDKD0WNzbFRb/bAXI1N67mH03g LAjSNhNY+0laeS8QYjL+xIav3xwxCy19skCvFYJDER2mBlTUgETVIbgunHKV3/0mglAn Q11mj7pDS33sY+XuGYB32UFUEFHNxlEwYHFRucdy+HzTTe8dqaOAonpIN5yhgkUmKosZ LNX7viPRhTb1Bu58OupTkvj/NXNEx3+LDKCLZ5P4hCVD3JOQ1riwi+Fi/h23WaUewUUW MeW/S3WPmYsOZYPOGy5gmx2sUOgEUB/QB3zF8pSheRO06J0GMB+IDqqR84Wl3/pIig3b Flzw== X-Gm-Message-State: AFeK/H2/80dEp29CsHyazYNbk8apdOd/h01i4sZ9JxXSwWd3RJ2E/jQNiwzvh1fRiqhDwg== X-Received: by 10.28.6.203 with SMTP id 194mr10257031wmg.125.1490218455532; Wed, 22 Mar 2017 14:34:15 -0700 (PDT) Received: from ?IPv6:2003:c6:ebdc:4000:94d5:56f1:aebf:596a? (p200300C6EBDC400094D556F1AEBF596A.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:94d5:56f1:aebf:596a]) by smtp.googlemail.com with ESMTPSA id t85sm1737073wmt.23.2017.03.22.14.34.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Mar 2017 14:34:15 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH 4/6] mmc: meson-gx: improve response reading To: Ulf Hansson , Kevin Hilman References: <8bf58a83-d8d7-615c-c89b-87a62a3c9c40@gmail.com> Cc: "linux-mmc@vger.kernel.org" , linux-amlogic@lists.infradead.org Message-ID: Date: Wed, 22 Mar 2017 22:33:50 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <8bf58a83-d8d7-615c-c89b-87a62a3c9c40@gmail.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 Response reading can be slightly improved by doing it in just one place. Signed-off-by: Heiner Kallweit --- drivers/mmc/host/meson-gx-mmc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 8bf3eb54..c4ddd820 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -562,6 +562,8 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id) goto out; } + meson_mmc_read_resp(host->mmc, cmd); + cmd->error = 0; if (status & IRQ_RXD_ERR_MASK) { dev_dbg(host->dev, "Unhandled IRQ: RXD error\n"); @@ -608,10 +610,8 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id) /* ack all (enabled) interrupts */ writel(status, host->regs + SD_EMMC_STATUS); - if (ret == IRQ_HANDLED) { - meson_mmc_read_resp(host->mmc, cmd); + if (ret == IRQ_HANDLED) meson_mmc_request_done(host->mmc, cmd->mrq); - } spin_unlock(&host->lock); return ret; @@ -636,7 +636,6 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id) data->bytes_xfered = xfer_bytes; } - meson_mmc_read_resp(host->mmc, cmd); if (!data || !data->stop || cmd->mrq->sbc) meson_mmc_request_done(host->mmc, cmd->mrq); else