Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp738958rdb; Wed, 1 Nov 2023 00:39:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFk+hhUDVhrpC2+QSmGwkB6cp+i7L6OVM0DRwpmWVRsXNu4sUIP7jmKHYf+vocxWyOTyLhv X-Received: by 2002:a05:6e02:1346:b0:359:34a7:22fd with SMTP id k6-20020a056e02134600b0035934a722fdmr3306506ilr.21.1698824350905; Wed, 01 Nov 2023 00:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698824350; cv=none; d=google.com; s=arc-20160816; b=shyAse1kHTot/mAnB+cTxpz/T2rSljRUWsashvdaJFBIERcaU6W+FKDIEBOMvNr7qp uhpfoLvsqUYfETGtNt52wdqBdX8WxLLDxocXHOiNg4N2pGmnKOPGR+ohhhTdzy8e8oCl gk5EdFL6sWZCEJGI7QpHd6jMTmc/UO43DZnc7inmWBoPmieUHHy+qhxYFeD6OuXjvv91 zRNZDPKrpo1eIzCIZr4P3cQQQnuprYHb59/5LfK2v6lcCdVG5jUB42DQ+PzyJB3YTugi CnlVagOyGaCg6UxwSdCn5gKxbeHKhL6EbjYzLcPjTkSXNE2kNg8K6I+b1PK9lf6YBo/g OWEQ== 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=B/ymYvz68TmAYsy3osQThBsQqGybcLhrtzuZ248faME=; b=uUk+Nr0NrV0dw0tzKf01pL9vpf/UakSoHrl6H8hCQhLKw47N27fYK3VLg4KeTSBmkH RgK6JlQTMFcUjN6jLsHcLLbzSqDcVnQYsifvKVgkPlEa9XkpbAHik3KagbSncqUUwBd7 uIPsLpsqYisC7ZeJIZQFhJ7UJMNpkQY8fiSXYJT9V6eKve5EZASZ89830ZufbX/vRnv4 iOxPtvE4QD08FKyuJvRCZAVjSI6CeOo9LiOejQg2OqsR+8msfxOrq1eGMTsEedSpx2Gh 0QyX/idC+m553+bMeBKw3gXrVnq3hEBHBc2/mS+SA0xgDvD5x8lkzuyZF4YYAcE1SZTP mNfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HFMC2Ejy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id a64-20020a639043000000b00580e32f778csi2422388pge.506.2023.11.01.00.39.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 00:39:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HFMC2Ejy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 876D28030BB5; Wed, 1 Nov 2023 00:39:09 -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 S231422AbjKAHjE (ORCPT + 99 others); Wed, 1 Nov 2023 03:39:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231546AbjKAHjC (ORCPT ); Wed, 1 Nov 2023 03:39:02 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66C19F1; Wed, 1 Nov 2023 00:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698824336; x=1730360336; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cUiL60Q4g/FFeKGo5RkMz2YZaR7uRt/yFxzYNEjO4gA=; b=HFMC2EjyhNFdp6DvAAJJNhT9T5VA8pjN30dI8XYcFTARdvBxSiC6T1Rt S1/LzCcPBKWfNMs7HNrhwjZ3Kh6eBFobtN/pC33fPGLPC4t6OJifmfXfc R9J0r8u8I69PncfIEbAQBd8q6wwxngXtTJvYbtqqpoH/WFRk8GyxX5zV/ hFDTAt12dIowltk7xx36uOFL4qESbCnBFu9u9Xk5sBKs2jV5NrJpiHQJ2 Q69GtM0fSQFXvGn2xlXXlSD5mvSe23BOhQchRuFUD9FsVR7z0aV9r+c5c Z9XZDt89WI1Ji94FUsrmsrJJEB9zRA/2GlZ//UUwtWHmfsD1XeAlhRNZ6 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10880"; a="9982674" X-IronPort-AV: E=Sophos;i="6.03,267,1694761200"; d="scan'208";a="9982674" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2023 00:38:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10880"; a="934357534" X-IronPort-AV: E=Sophos;i="6.03,267,1694761200"; d="scan'208";a="934357534" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.34.17]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2023 00:38:49 -0700 From: Adrian Hunter To: Ulf Hansson , =?UTF-8?q?Kornel=20Dul=C4=99ba?= , Radoslaw Biernacki , Gwendal Grignou , Ritesh Harjani , Asutosh Das Cc: Chaotian Jing , Aswath Govindraju , Bhavya Kapoor , Kamal Dasu , Al Cooper , Haibo Chen , Bhupesh Sharma , Shaik Sajida Bhanu , Sai Krishna Potthuri , Swati Agarwal , Victor Shih , Ben Chuang , Thierry Reding , Aniruddha Tvs Rao , Chun-Hung Wu , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] mmc: cqhci: Increase recovery halt timeout Date: Wed, 1 Nov 2023 09:38:24 +0200 Message-Id: <20231101073827.4772-3-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231101073827.4772-1-adrian.hunter@intel.com> References: <20231101073827.4772-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,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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]); Wed, 01 Nov 2023 00:39:09 -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