From patchwork Tue Jun 21 13:12:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 9190527 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 175F96075E for ; Tue, 21 Jun 2016 13:21:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0993527F8D for ; Tue, 21 Jun 2016 13:21:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F27CC2818B; Tue, 21 Jun 2016 13:21:30 +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 2E27428156 for ; Tue, 21 Jun 2016 13:21:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751591AbcFUNVU (ORCPT ); Tue, 21 Jun 2016 09:21:20 -0400 Received: from mail-lf0-f42.google.com ([209.85.215.42]:33652 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751589AbcFUNVS (ORCPT ); Tue, 21 Jun 2016 09:21:18 -0400 Received: by mail-lf0-f42.google.com with SMTP id f6so23580144lfg.0 for ; Tue, 21 Jun 2016 06:21:17 -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=ta1M+iZLkCj+EosHeNDFjISciHtbepbWeh4Bi3jmUzQ=; b=Nl1vB27+CAbYmlnH3BmRCqRCaGxzfXD67QkqI1Ge/hYg5lAaGowLZaKUP4WUgcgmMt VcdDzvdwJaxK+euEgZyxWNHtBzSOHWFDTvqroXcL6ftdHxcacTGj+tOydJJWSqQbrKee pzZzHxFzUloVN442OZ9OLrpa6qyfK87MNhKrA= 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=ta1M+iZLkCj+EosHeNDFjISciHtbepbWeh4Bi3jmUzQ=; b=G+vCiKv8fX/tYTDCQko/HYkmrioSygc3huiAmw4+df678XrASKxNZb4Oip2FFQkKLe Licke1O1+HvxMxSn73GPUTdMlzsfeeNozveB2Q9QH5Np/URtAFGe9iX6n0ryBGUWEmxL GGoXva56mrhpRI7yAc4j73tk5wJoKx+slFvUk4In0/lkeqjBXfqLGtVZwX8rzZt8+lxi xSzlwC0YV002TN4U/UhgmqLj058XD7p2LNqqxQpM1JR+aj/935Ykeh52EfLTQqQgj67f f4BU4L3Qd/sdcpEc8roYRtu2x+KFIXmo6f1P3Fe68D+wfn7PS37cLji1LhUV6kOt8y3N Koeg== X-Gm-Message-State: ALyK8tIFC0wg4cECxzOIwfLx22O+z5fY6843HvqXffFzXihOfVMpqhuRdA5iTiQYSV9MJ401 X-Received: by 10.25.32.10 with SMTP id g10mr2446499lfg.188.1466514797933; Tue, 21 Jun 2016 06:13:17 -0700 (PDT) Received: from uffe-Latitude-E6430s.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id ze5sm4978244lbb.8.2016.06.21.06.13.15 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Jun 2016 06:13:16 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Kuninori Morimoto , Geert Uytterhoeven , Nguyen Viet Dung , Magnus Damm , Simon Horman , Baolin Wang Subject: [PATCH 5/5] mmc: sh_mmcif: Use a 10s timeout in the error recovery path Date: Tue, 21 Jun 2016 15:12:50 +0200 Message-Id: <1466514770-9462-6-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466514770-9462-1-git-send-email-ulf.hansson@linaro.org> References: <1466514770-9462-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 current value means an mdelay(1) may execute up to 10000000 times, which translates to around ~2.8 hours. This is probably not what the orignal author had in mind. Let's instead use 10s, which is the same value sh_mmcif is using for other timeouts. Signed-off-by: Ulf Hansson --- drivers/mmc/host/sh_mmcif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index bab971b..9007784 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -574,7 +574,7 @@ static int sh_mmcif_error_manage(struct sh_mmcif_host *host) if (state1 & STS1_CMDSEQ) { sh_mmcif_bitset(host, MMCIF_CE_CMD_CTRL, CMD_CTRL_BREAK); sh_mmcif_bitset(host, MMCIF_CE_CMD_CTRL, ~CMD_CTRL_BREAK); - for (timeout = 10000000; timeout; timeout--) { + for (timeout = 10000; timeout; timeout--) { if (!(sh_mmcif_readl(host->addr, MMCIF_CE_HOST_STS1) & STS1_CMDSEQ)) break;