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: 9249727 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 9571B607F0 for ; Wed, 27 Jul 2016 12:25:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87AC6212DA for ; Wed, 27 Jul 2016 12:25:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C493271FD; Wed, 27 Jul 2016 12:25:57 +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 B121F212DA for ; Wed, 27 Jul 2016 12:25:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755485AbcG0MZ4 (ORCPT ); Wed, 27 Jul 2016 08:25:56 -0400 Received: from mail-lf0-f54.google.com ([209.85.215.54]:35711 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754131AbcG0MZz (ORCPT ); Wed, 27 Jul 2016 08:25:55 -0400 Received: by mail-lf0-f54.google.com with SMTP id f93so26122932lfi.2 for ; Wed, 27 Jul 2016 05:25:54 -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=TLghUyAKvHkMBX8IrA40YWCadE8pxbG4wYQgBJZW8QgXwr42T69lF9ImT8Y6uc/yXq EOOoe3ExXrj0bMAUMwwcUVXBNMBfzirfWo/g7UizQg4luwiqTWQMet2ca2ITZGfSFRPx POyh88qBeJ3cLmfapZVjfLSWWqNghtzObhSihDs1mN8NTuVbrs++PIf5OJynj2v1Tvky RJIy/VIX6icU/Wz9PfO2HwOLRBOE0GlwO1esHRASs3XW07jHul+h29U7HAF6c6lddRbB CURixM9SivgW4SV8Vh/o9N1TnatzoWfBQiCaWVCaGTaj6YiPnT3vKh+1VYSkwYN6Evhy mpVQ== X-Gm-Message-State: AEkoouvYKM+CNHwOcju5oZf4e/SI2Z0zzm+72prD8Rqetp3219xFP/Ut43/avCQFtv5YixPe X-Received: by 10.25.126.6 with SMTP id z6mr9806023lfc.155.1469622353577; Wed, 27 Jul 2016 05:25:53 -0700 (PDT) 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> 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 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(-) 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,