From patchwork Mon Feb 5 12:50:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 10200247 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 50B1B60247 for ; Mon, 5 Feb 2018 12:52:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41892286BE for ; Mon, 5 Feb 2018 12:52:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35A462871B; Mon, 5 Feb 2018 12:52:06 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 9D62A286BE for ; Mon, 5 Feb 2018 12:52:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbeBEMwD (ORCPT ); Mon, 5 Feb 2018 07:52:03 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:11515 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753085AbeBEMvp (ORCPT ); Mon, 5 Feb 2018 07:51:45 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w15CpHSB004246; Mon, 5 Feb 2018 06:51:17 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1517835077; bh=/DCDbSe7GEd019mLxrbWUNKUxG33zzPLuCZTa3WzIb4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=spuqTqk1UUzDVjjRtt5Mxy0QKnA662HMzUmrhDcNPrFO9RvvyTXndasVsWSi9lXKT QD6ix7GzBE44/AVuWimk44O8IbaGy8qHWGg/aEhbB6bsAq6zCin8yEboKp42ARAtvf d0J08gsXd/Hd5u0/GzrDuftdVHD8ztTBeC6s/W0g= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CpHur020430; Mon, 5 Feb 2018 06:51:17 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 5 Feb 2018 06:51:16 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 5 Feb 2018 06:51:16 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CoaGf023963; Mon, 5 Feb 2018 06:51:13 -0600 From: Kishon Vijay Abraham I To: Ulf Hansson , Tony Lindgren , Adrian Hunter CC: Rob Herring , Mark Rutland , Russell King , Kishon Vijay Abraham I , , , , , Subject: [PATCH v2 10/16] mmc: sdhci: Fix to use data_timer only for data line commands Date: Mon, 5 Feb 2018 18:20:23 +0530 Message-ID: <20180205125029.21570-11-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180205125029.21570-1-kishon@ti.com> References: <20180205125029.21570-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP commit d7422fb489eee5587d3eec ("mmc: sdhci: Separate timer timeout for command and data requests") while separating timer timeout for command and data requests, passed cmd->mrq to sdhci_mod_timer (cmd is an argument to sdhci_send_command) and in sdhci_mod_timer used mrq->cmd to check if it is a data line command. This results in using data timer for commands like MMC_SET_BLOCK_COUNT (CMD23) though it is not a data line command. Fix it here. Fixes: commit d7422fb489eee5587d3eec ("mmc: sdhci: Separate timer timeout for command and data requests") Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/sdhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 1aa74b4682f3..0489572d1892 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1073,10 +1073,10 @@ static void sdhci_finish_data(struct sdhci_host *host) } } -static void sdhci_mod_timer(struct sdhci_host *host, struct mmc_request *mrq, +static void sdhci_mod_timer(struct sdhci_host *host, struct mmc_command *cmd, unsigned long timeout) { - if (sdhci_data_line_cmd(mrq->cmd)) + if (sdhci_data_line_cmd(cmd)) mod_timer(&host->data_timer, timeout); else mod_timer(&host->timer, timeout); @@ -1135,7 +1135,7 @@ void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) timeout += DIV_ROUND_UP(cmd->busy_timeout, 1000) * HZ + HZ; else timeout += 10 * HZ; - sdhci_mod_timer(host, cmd->mrq, timeout); + sdhci_mod_timer(host, cmd, timeout); host->cmd = cmd; if (sdhci_data_line_cmd(cmd)) {