Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp330262rdf; Fri, 3 Nov 2023 01:48:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGO3nxK3tgfNI5Wg/gdgTEczvNcYIIgO5oUjnHRJzvYxjMqiEuHVumF+PO7LanSDxDYeR0U X-Received: by 2002:a05:6a20:2451:b0:162:650c:76b8 with SMTP id t17-20020a056a20245100b00162650c76b8mr25825082pzc.45.1699001316084; Fri, 03 Nov 2023 01:48:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699001316; cv=none; d=google.com; s=arc-20160816; b=YBuaTU9fodHLS3hgiwWsOefA1VhweKpcDNOBijj/pfaPD9L0FHxq7IwiD2Qj9AGFOX bOTq7rtcBnTVAsofXjs45TE8qTPSv6EtBSUEUDQg9dm4MOnjcRAgQlRkV8vBq8p/M/Yp e2TtCbzNef8d6CsGqTF9VWQQjxvzZaXqWsXDhaKx8jYLRwGN27+4JPwhQ+Qa250ZIyq3 cyWQVp5OwcFDc28bMNHKNotRVa9TBNTN1YGx8J4/F8kX6bR+kjJSttW8wKmEHA4tS8UE jwpqBgyIMfsHyh9fGSqBJLD7IJV1gY0R9KgOtfQHYiNJ1it3NIY8+ZtEh5MLP3+ftPR7 t1mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xB18ET7k5Cab0qNbVr1XjceBMbRVUdXjO5899oGyQyI=; fh=aIvDo0DPc47ZdKemLI3k3NodRhLAZ2m+5rlxdvTm1gA=; b=q1KgSySuCJxFQpCJy/B61hfD13MRUnGWg7WvtX1NZxVzVxsA3sg/TrZupMJAa60Kce qUeG/jQ/69lyxlNmSgxNmrEG7EMuFd1TRgukOvlNmrzHzePFfh12DTXohrA0IU/lOoah dYrQW1YPucFochtbEwnFRVlNTxmUVGKgKkCnoDd4W7qNpA1voua9b5teqgPZCZ4dDn19 KtGKUSxAzcASmN6Te6u8dFcZuM+XY5o6T1iRoK9NDXjJQ3+MHJi+ABOJ6A/r7bb33lGl tPiUHhtWI1CT7UQKkzb8O6wEgGzCxjZ9odq9Wtt6Zbj3Vr7oEDOPBoXSQhfLqRgZ9kCI O5JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NKXXyLYp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o2-20020a656a42000000b005af21fd2c7dsi1222659pgu.412.2023.11.03.01.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 01:48:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NKXXyLYp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 296A0837B2C7; Fri, 3 Nov 2023 01:48:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345360AbjKCIsa (ORCPT + 99 others); Fri, 3 Nov 2023 04:48:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345458AbjKCIsZ (ORCPT ); Fri, 3 Nov 2023 04:48:25 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E457CE; Fri, 3 Nov 2023 01:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699001301; x=1730537301; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cUiL60Q4g/FFeKGo5RkMz2YZaR7uRt/yFxzYNEjO4gA=; b=NKXXyLYpweIc7hJ3SvY3EM5xJp2MFZk4bOIRRbMaVOO9jAHogMCWzVNo Edx3sTvdR9Wwfh4UEXZ1Zvz5qTFVi5ORIj3e68GcDmlQA8dpI4OKs4Qkw Xv4xOz0opBRTGYzaK4U4ud5AnFXS3GjIlI7uWpQ5uB1RL93EXs8lM4hK8 FpmDNKtJBUnhlctjZx0imqMu7Vk2JEc5E1atDFzPPYlOp9C8Yb/wWuf+u fbGJQiXs3w3otEDJ6E8tUUOgjE7IOQ7ubWWff3pQjdwKicH0p2wuqCkHT 2hDjrJfqdTcCHMOmnvPYTEGDPKaKro1NiEDQw00K3g2Qw3rgAK09sYZk6 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="391774512" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="391774512" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2023 01:48:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="796556495" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="796556495" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.133]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2023 01:48:15 -0700 From: Adrian Hunter To: Ulf Hansson , =?UTF-8?q?Kornel=20Dul=C4=99ba?= , Radoslaw Biernacki , Gwendal Grignou , Asutosh Das Cc: Chaotian Jing , Bhavya Kapoor , Kamal Dasu , Al Cooper , Haibo Chen , Shaik Sajida Bhanu , Sai Krishna Potthuri , Victor Shih , Ben Chuang , Thierry Reding , Aniruddha Tvs Rao , Chun-Hung Wu , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 2/6] mmc: cqhci: Increase recovery halt timeout Date: Fri, 3 Nov 2023 10:47:16 +0200 Message-Id: <20231103084720.6886-3-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231103084720.6886-1-adrian.hunter@intel.com> References: <20231103084720.6886-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 03 Nov 2023 01:48:35 -0700 (PDT) Failing to halt complicates the recovery. Additionally, unless the card or controller are stuck, which is expected to be very rare, then the halt should succeed, so it is better to wait. Set a large timeout. Fixes: a4080225f51d ("mmc: cqhci: support for command queue enabled host") Cc: stable@vger.kernel.org Signed-off-by: Adrian Hunter --- drivers/mmc/host/cqhci-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/cqhci-core.c b/drivers/mmc/host/cqhci-core.c index b3d7d6d8d654..15f5a069af1f 100644 --- a/drivers/mmc/host/cqhci-core.c +++ b/drivers/mmc/host/cqhci-core.c @@ -984,10 +984,10 @@ static bool cqhci_halt(struct mmc_host *mmc, unsigned int timeout) /* * After halting we expect to be able to use the command line. We interpret the * failure to halt to mean the data lines might still be in use (and the upper - * layers will need to send a STOP command), so we set the timeout based on a - * generous command timeout. + * layers will need to send a STOP command), however failing to halt complicates + * the recovery, so set a timeout that would reasonably allow I/O to complete. */ -#define CQHCI_START_HALT_TIMEOUT 5 +#define CQHCI_START_HALT_TIMEOUT 500 static void cqhci_recovery_start(struct mmc_host *mmc) { -- 2.34.1