From patchwork Wed Jul 27 12:25:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 72865 Delivered-To: patches@linaro.org Received: by 10.140.29.52 with SMTP id a49csp278367qga; Wed, 27 Jul 2016 05:25:54 -0700 (PDT) X-Received: by 10.46.32.131 with SMTP id g3mr10533946lji.46.1469622354154; Wed, 27 Jul 2016 05:25:54 -0700 (PDT) Return-Path: Received: from mail-lf0-x232.google.com (mail-lf0-x232.google.com. [2a00:1450:4010:c07::232]) by mx.google.com with ESMTPS id 10si3080547lff.225.2016.07.27.05.25.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jul 2016 05:25:54 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::232 as permitted sender) client-ip=2a00:1450:4010:c07::232; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::232 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x232.google.com with SMTP id l69so26125381lfg.1 for ; Wed, 27 Jul 2016 05:25:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4AnJFXuSmZSKDYJEeYx7oIAIqKzFR5xZZRgK5MOcasI=; b=J39Y9N976CSxVJCkaaeXayHH62usbiMyvxno3mkDFfhX20ksSFm07xhWy74zPF2G+T iDC7MVE1ERqqa1WIBth+/Ojeejfu9Za4nf/tGj5MLK0++hsJqG+kLpZBlZgw/xd406lg gM9MPuf/7m+SDbNjje//1PVdkDKFTSPO7phZs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4AnJFXuSmZSKDYJEeYx7oIAIqKzFR5xZZRgK5MOcasI=; b=mCphRPbPlx6zTmtKMspKc49EJmrvm9X39JeJh8i8eY0TAWIienIJxSVWYVhK8gSQD7 +I2e9UaoP3Zs8l0uc64b7t7cXoqH3F7/ejY4/CFslnjX4u7pBYwV8LBOK1vGOlGRmGHC 1OGh4eZtugaQOJZ9lwb/dP+YVbmCM5IvnkepNq2/T3j+ZkvNJQOTjwCtVOpjYXFeqyVF luuIshWc4DzxVq1hKqgs5E/wwPo7ZVmWcyum4ZVecWPCgKUivnCsTkag5Gu/W1dRps/e d4bGZSXhHkfcofqI4KITZHQ5NEI3GgIP77q9oIfM5lrJ1zCTtiarEXayN7SHI+khp7BF fXqw== X-Gm-Message-State: AEkoouutssSDH01gpnJIVCFhrVeg491VlueuVWlmEjaxQqHJAwzahTQP3M3fm9TkxlPrADNNs1I= X-Received: by 10.25.126.6 with SMTP id z6mr9806023lfc.155.1469622353577; Wed, 27 Jul 2016 05:25:53 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-155-4-128-67.na.cust.bahnhof.se. [155.4.128.67]) by smtp.gmail.com with ESMTPSA id 196sm968081ljf.5.2016.07.27.05.25.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Jul 2016 05:25:52 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Micky Ching , Wei WANG , Roger Tseng , Mauro Santos , Baolin Wang Subject: [PATCH 1/2] mmc: rtsx_pci: Use the provided busy timeout from the mmc core Date: Wed, 27 Jul 2016 14:25:37 +0200 Message-Id: <1469622338-11158-2-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469622338-11158-1-git-send-email-ulf.hansson@linaro.org> References: <1469622338-11158-1-git-send-email-ulf.hansson@linaro.org> The rtsx_pci driver is using a fixed 3s timeout for R1B responses, which in some cases isn't suffient. For example, erase/discard requests may require longer timeouts. Instead of always using a fixed timeout, let's use the per request calculated busy timeout from the mmc core. Cc: Micky Ching Signed-off-by: Ulf Hansson --- drivers/mmc/host/rtsx_pci_sdmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index 9313748..6158b96 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -244,7 +244,7 @@ static void sd_send_cmd_get_rsp(struct realtek_pci_sdmmc *host, stat_idx = sd_status_index(rsp_type); if (rsp_type == SD_RSP_TYPE_R1b) - timeout = 3000; + timeout = cmd->busy_timeout ? cmd->busy_timeout : 3000; if (cmd->opcode == SD_SWITCH_VOLTAGE) { err = rtsx_pci_write_register(pcr, SD_BUS_STAT,