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: 126853 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1942384ljc; Mon, 5 Feb 2018 04:52:06 -0800 (PST) X-Google-Smtp-Source: AH8x226GLPGp6gid5TWLUo2cBOlZqlZsUfLURY+LPLvWE6pDyUsyLVm4uN20HzynvWNR4yQ9zniW X-Received: by 10.98.162.10 with SMTP id m10mr48446725pff.168.1517835125903; Mon, 05 Feb 2018 04:52:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517835125; cv=none; d=google.com; s=arc-20160816; b=Hr06qKyOtruTCiybweyEDwcbbmnHvIKWck0hYJaYklukkBvrHiiO9Jym0BjZV+pljU gsyfrrgApgUreMoIZSrvJn2Sg3DRErDccWxHhMy9R7PI4a26n0o6iK8fN+G0rKXuIieN VANfDtZQerMU9I5BxWYe9QkL3vo1wP2FNrkayNmrlqLXvP3fwJJVU3X9eh6XOZ7sXwnP ikK+dpJBE5H1wYLmo7PyTSoxaHRNVMaKn8MCLlMMQj3eB9NOGM6XLJsrcFrgH31MKeI5 vG8rPddCR8mwyMt0e4kzWFga5IkZ4xCqoNQP86z+Mfg928djbl6v4WRHYQ+RKY0rBO5T dmMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=FrgSMUZJHW1bwn6G4MapHOAbh/7VbrQjaZZoXNtku6w=; b=FvStBr/aqf8XC17E+CU05QgQskChzQcVqGGSWbdACxBAfBveqodIcBbpUVscVyccU9 rMNV30uTEj6aZGyVrSKmY4m1GD/Nt+4QAi5v/g/S9buFlvUmmI9rWZYWSlAS6jmzc6ob 5jZ99WjzGVjoDVeEOOZj6YskoGaB/dcPKK5JW3SKmO8hHNQRbiMW9AGXWhoWF/bzAtfQ 0u3fhLnACxoct9nHZXkuyIKjPak5/5HG0dZodlEeyCpNUPN1W5qEBT2kMetR1K8wvUx7 hwEHWlda35zNwsNoTSNtuVnI0wwKPgJRZio7ihv9JVzp6yjvT+uzqjaka/euKiucJSsX GuNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=spuqTqk1; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j11si4433170pff.406.2018.02.05.04.52.05; Mon, 05 Feb 2018 04:52:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=spuqTqk1; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbeBEMwD (ORCPT + 5 others); 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 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(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)) {