From patchwork Fri Jul 12 09:45:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UGV0ZXIgV2FuZyAo546L5L+h5Y+LKQ==?= X-Patchwork-Id: 13731553 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16B2B82D93 for ; Fri, 12 Jul 2024 09:45:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.244.123.138 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720777519; cv=none; b=KHHNz/A1/rolBJJ9uaus90AgEKI3zvZosObDTVzzNNQcozh6EprAZoNrYohwvdJkJNPe2mzbaoRRRuE+cUcoE2ryms+k8SAnwAiZxlz/JIMIClfP3txmm3DIJmR68LL3lH/p/8UtSGSiuMAOBlZIjhER8oMeG24xYRkCI26FEuk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720777519; c=relaxed/simple; bh=OXiSP0vVNOHn1hJ86DEwJmS3Jiy72EDbBPDtinCc0rY=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=MxZMPn8RYksKWnPw07/ybkpTaVAJh/+ErYuS5Px7u1+ZZ5Q1MXdJn27Xt+vZMs0mFEB/akwwJbslRHw0OHZ+tHVt5381rxwc3Tnk1Zxi07BhT2NV7gRAn3sKRQSCWXJ7HEWcUz1majUnz/5pKyfyCtj7d0oyeEpGYIqeQ2sTX8o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=DVn3TVNW; arc=none smtp.client-ip=60.244.123.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="DVn3TVNW" X-UUID: 6dcaba9e403311efb5b96b43b535fdb4-20240712 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=rTcWd7Y+2uU+htlZ+Zs0y/k1MjeuEU+D5s5qrsCnvug=; b=DVn3TVNWgxFWZRxW+NZ19Gxv8ru2SoaMa8UvOuI/f7DgWye70LgJ1s1xcQpG3IA7IxJZZMrXJjQiJqF1DxQaNkHW5BffIn8oPBQTvY2UzSu+C3RbMgxp6nFumZoS2jdynBWIyC1iPvsZXWE7gQd5vUAFXSm4YpBJ2F2rhVNJoFw=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.40,REQID:0485f113-7599-452b-b34c-75865c1fb2d0,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:ba885a6,CLOUDID:269967d1-436f-4604-ad9d-558fa44a3bbe,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES :1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULN X-UUID: 6dcaba9e403311efb5b96b43b535fdb4-20240712 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 33132149; Fri, 12 Jul 2024 17:45:10 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by MTKMBS09N1.mediatek.inc (172.21.101.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 12 Jul 2024 17:45:09 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 12 Jul 2024 17:45:09 +0800 From: To: , , , , CC: , , , , , , , , , , , , , , Subject: [PATCH v1] ufs: core: bypass quick recovery if need force reset Date: Fri, 12 Jul 2024 17:45:06 +0800 Message-ID: <20240712094506.11284-1-peter.wang@mediatek.com> X-Mailer: git-send-email 2.18.0 Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MTK: N From: Peter Wang If force_reset is true, bypass quick recovery. This will shorten error recovery time. Signed-off-by: Peter Wang Reviewed-by: Bean Huo Reviewed-by: Bart Van Assche --- drivers/ufs/core/ufshcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 46433ecf0c4d..357379ddd79a 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -6545,7 +6545,8 @@ static void ufshcd_err_handler(struct work_struct *work) if (ufshcd_err_handling_should_stop(hba)) goto skip_err_handling; - if (hba->dev_quirks & UFS_DEVICE_QUIRK_RECOVERY_FROM_DL_NAC_ERRORS) { + if ((hba->dev_quirks & UFS_DEVICE_QUIRK_RECOVERY_FROM_DL_NAC_ERRORS) && + !hba->force_reset) { bool ret; spin_unlock_irqrestore(hba->host->host_lock, flags);