From patchwork Wed May 2 12:10:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 134828 Delivered-To: patches@linaro.org Received: by 10.46.151.6 with SMTP id r6csp609257lji; Wed, 2 May 2018 05:10:45 -0700 (PDT) X-Received: by 2002:a19:9915:: with SMTP id b21-v6mr12408400lfe.146.1525263045381; Wed, 02 May 2018 05:10:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525263045; cv=none; d=google.com; s=arc-20160816; b=AHYXfsVO5IaSIhkyuX8xm1L1LhWpxjPL3hp5m+BFn+9Tl1DUgThYUnECYQ1P/HizYG erY5kAa6kvc+CjZ+0E9skht9AO4WAEmhIZnZl0X33wVDkPhHNZ0GYnIOI0hh0IItlcTI y/+8d5/bkVXk7Uh2IR5/jHxShbv7HJ4+Q1DB5S4GbFOROQpmaM6crogJWU7RC1c1Ld3n urnw1kLremRNnEyygjCufHHgite71UbfJPTLA2FtJN9ua2zDV5QBuhxA3rARgXI0B79W 1UsCPnpzPEWQahWwETynFZyYPX1o7NTgeIhWIWMcyRdIzNFwu5fnSB8eoY5a4XGe0vm3 XqFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=S+V4poVcuaiggcd1Y1cRrpx7Yk+BrvzxVKhQ/goVP7c=; b=wQHBhq/92d89zdYBEywNVDcvwGE+cYMl3cMeZinML21UMSLeQdv3pvTqmMU4cY7iAm DXupKa06BVMxxAjWp6oIEqDGrZej+guumjKJ8T2ihBLhwaQ2GDyRb8lOoXYFozfD7gED ZVaoBZcBx1hWGAYQkAvhN8lYExwIjNn2Fp/v8bI2Co9gQX3mjs2QSZoMrDnLQUAYat5i Z+lFpH9bgTFvZM9UZL+lZPWBf1ZJpRxXB7H5jQpYZa2ZwDEtwjO7abk1YojESGGJuFgD P/rpUfz/SIjS8nr7iDuoZ2AzooKzKdBUfyg5tG9T2zYHSl4D3uaGfQr2HTOCMMqMFDsn peug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OL9ITKMr; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id f64-v6sor2322582lfg.19.2018.05.02.05.10.45 for (Google Transport Security); Wed, 02 May 2018 05:10:45 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OL9ITKMr; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=S+V4poVcuaiggcd1Y1cRrpx7Yk+BrvzxVKhQ/goVP7c=; b=OL9ITKMrFnN0yGPJjmqn0QQwalMRHv+IaVkZYX99qPOxtKDCW2jIgFtW1rSLlvXQ+T uGk6Y7eqHHwKyzmijW+PoTTXzG0FMZFYZpZhtNs2WsENm7fhVHOX/I5I3FmKKoD0UXSx 4QfTjjh0/OLZ7IF3DsezUWZDCf18F36b+Qfps= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=S+V4poVcuaiggcd1Y1cRrpx7Yk+BrvzxVKhQ/goVP7c=; b=VbnsYko9L2tEeVZy126uvyz/OOBN2lIgIgc3jxigPWi/01fHMAWjwmBv035AwpgxXc rsjbJ6a6kPu9d2bRxKfO1V/TOJgCIDUKjBLGJRANZji5fS5Oai4rtbHY1W2vPWURkPZM ni8e5G3rai5lONzfh3W5AIEVLuriYpoKx54ii8+c2d2E3y9VvAoD2lx7FZMRhj8lQMFG jspsWppktU4gSj59iU12r8u5diUqX6KkTgL5DDuNT+PgtSI19xXmCzfZ2cdVMwECd5gV m8jpdvscVFpuJFiGaRFTYTqP/zfW/XUK2XgBF0c7759xtDyG8HqfqHq5ED2WUZG49X0o NKFA== X-Gm-Message-State: ALQs6tDvIwGlDj2t/Zg4i8SMa4heGjVgq1FIfxHWTU1bPOXcPHqzK25H mUK1Al0BFVp/PalO4vRPiUeirbj8 X-Google-Smtp-Source: AB8JxZrZp2Am/caVPKYJL2eezFSRuW6EIq722yaZuGnKVkme1+HqnWDE1w3oXkOP+EIH7mMG+5zpKQ== X-Received: by 2002:a19:f612:: with SMTP id x18-v6mr9574715lfe.60.1525263045156; Wed, 02 May 2018 05:10:45 -0700 (PDT) Return-Path: Received: from uffe-XPS-13-9360.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id y23-v6sm1867526ljh.88.2018.05.02.05.10.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 May 2018 05:10:44 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: michal.pecio@gmail.com Subject: [PATCH 2/3] mmc: rtsx_usb: Use the provided busy timeout from the mmc core Date: Wed, 2 May 2018 14:10:36 +0200 Message-Id: <1525263037-16996-2-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525263037-16996-1-git-send-email-ulf.hansson@linaro.org> References: <1525263037-16996-1-git-send-email-ulf.hansson@linaro.org> Instead of using a fixed 3s timeout for commands with R1B responses, convert to use the per request calculated busy timeout from the mmc core. This is needed to cope with requests that requires longer timeout, for example erase/discard commands. Signed-off-by: Ulf Hansson --- drivers/mmc/host/rtsx_usb_sdmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c index f9faa98..560614c 100644 --- a/drivers/mmc/host/rtsx_usb_sdmmc.c +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c @@ -342,7 +342,7 @@ static void sd_send_cmd_get_rsp(struct rtsx_usb_sdmmc *host, } 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_usb_write_register(ucr, SD_BUS_STAT,