From patchwork Wed Jan 22 15:00:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 23532 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9FFD218CB for ; Wed, 22 Jan 2014 15:00:35 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id wo20sf1608891obc.7 for ; Wed, 22 Jan 2014 07:00:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=Ay+3kQIrjeqha7UeO229CHAbvJ0DUKN6wVC6OLobk0A=; b=XtrwHguIRU9iYmHp+g2qJjqSWqpzRgBhgGHPJLnkxZHtIYSmNZeV2lr6iOWinuqlkq Y9Yhd+Ap0zihTDtaVtw/mJE/+06jgn509ez/Mv18nLxR4w5HiZ4MEjA/44jtrDAEXHtn xHNAoeHND34oBrO/DJ6Wfu1Q1FtQ2upKsD14mZc2mfub+MlPOjP/xr8XOPF1abg9iEmv FZC78PBQzB6q37z0wSKn3Gzvhq4lLzl1bZdSJIhNL2ewx2Z7sVy45QLP2Z0LeWjpYMyx E5AB0W6yn9aY+LLxK19CLlTsFWBMYznugVfla3GVxyl13L5BMUktYga6Xv1Vhxb8v9uq F08w== X-Gm-Message-State: ALoCoQny7gMelM83dTftCdCMBlkUXfHd10dph6BnV4/wxDb8oe609WU6R+0yTxUyHA17Nh8So5T8 X-Received: by 10.182.88.200 with SMTP id bi8mr689461obb.43.1390402834945; Wed, 22 Jan 2014 07:00:34 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.165 with SMTP id m5ls73459qen.52.gmail; Wed, 22 Jan 2014 07:00:34 -0800 (PST) X-Received: by 10.58.4.138 with SMTP id k10mr1238492vek.8.1390402834720; Wed, 22 Jan 2014 07:00:34 -0800 (PST) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id c2si4689779vct.67.2014.01.22.07.00.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 07:00:34 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.50; Received: by mail-vb0-f50.google.com with SMTP id w8so278654vbj.37 for ; Wed, 22 Jan 2014 07:00:34 -0800 (PST) X-Received: by 10.221.34.211 with SMTP id st19mr1212729vcb.5.1390402834635; Wed, 22 Jan 2014 07:00:34 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp190310vcz; Wed, 22 Jan 2014 07:00:34 -0800 (PST) X-Received: by 10.181.11.133 with SMTP id ei5mr3705459wid.2.1390402833330; Wed, 22 Jan 2014 07:00:33 -0800 (PST) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx.google.com with ESMTPS id o7si447535wiy.16.2014.01.22.07.00.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 07:00:33 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.178 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.212.178; Received: by mail-wi0-f178.google.com with SMTP id cc10so683022wib.5 for ; Wed, 22 Jan 2014 07:00:32 -0800 (PST) X-Received: by 10.194.173.163 with SMTP id bl3mr2366299wjc.10.1390402832877; Wed, 22 Jan 2014 07:00:32 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id dd3sm15401824wjb.9.2014.01.22.07.00.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 07:00:32 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Chris Ball Cc: Dong Aisheng , Stephen Warren , Vladimir Zapolskiy , Adrian Hunter , Ulf Hansson Subject: [PATCH 02/10] mmc: core: Rename cmd_timeout_ms to busy_timeout Date: Wed, 22 Jan 2014 16:00:16 +0100 Message-Id: <1390402824-9850-3-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1390402824-9850-1-git-send-email-ulf.hansson@linaro.org> References: <1390402824-9850-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , To better reflect that the cmd_timeout_ms is directly related to the busy detection timeout, let's rename it. Signed-off-by: Ulf Hansson --- drivers/mmc/core/core.c | 2 +- drivers/mmc/core/mmc_ops.c | 2 +- drivers/mmc/host/sdhci.c | 8 ++++---- include/linux/mmc/core.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index a81d754..90de094 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1950,7 +1950,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from, cmd.opcode = MMC_ERASE; cmd.arg = arg; cmd.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC; - cmd.cmd_timeout_ms = mmc_erase_timeout(card, arg, qty); + cmd.busy_timeout = mmc_erase_timeout(card, arg, qty); err = mmc_wait_for_cmd(card->host, &cmd, 0); if (err) { pr_err("mmc_erase: erase error %d, status %#x\n", diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index e5b5eeb..3377bbf 100644 --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c @@ -432,7 +432,7 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value, cmd.flags |= MMC_RSP_SPI_R1 | MMC_RSP_R1; - cmd.cmd_timeout_ms = timeout_ms; + cmd.busy_timeout = timeout_ms; if (index == EXT_CSD_SANITIZE_START) cmd.sanitize_busy = true; diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index ec57c6c..1853255 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -675,12 +675,12 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd) return 0xE; /* Unspecified timeout, assume max */ - if (!data && !cmd->cmd_timeout_ms) + if (!data && !cmd->busy_timeout) return 0xE; /* timeout in us */ if (!data) - target_timeout = cmd->cmd_timeout_ms * 1000; + target_timeout = cmd->busy_timeout * 1000; else { target_timeout = data->timeout_ns / 1000; if (host->clock) @@ -1019,8 +1019,8 @@ void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) } timeout = jiffies; - if (!cmd->data && cmd->cmd_timeout_ms > 9000) - timeout += DIV_ROUND_UP(cmd->cmd_timeout_ms, 1000) * HZ + HZ; + if (!cmd->data && cmd->busy_timeout > 9000) + timeout += DIV_ROUND_UP(cmd->busy_timeout, 1000) * HZ + HZ; else timeout += 10 * HZ; mod_timer(&host->timer, timeout); diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 87079fc..b276996 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -95,7 +95,7 @@ struct mmc_command { * actively failing requests */ - unsigned int cmd_timeout_ms; /* in milliseconds */ + unsigned int busy_timeout; /* busy detect timeout in ms */ /* Set this flag only for blocking sanitize request */ bool sanitize_busy;