Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp345095pxb; Wed, 29 Sep 2021 00:03:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWrB1kl6QLs7jrOaMYlA1q2GcrxxBdHj0LF1I8o5T+OeqEBV6o9jRp7vVnv/ABuU6w1Gv4 X-Received: by 2002:aa7:9474:0:b0:44b:dffe:5b6b with SMTP id t20-20020aa79474000000b0044bdffe5b6bmr1500pfq.69.1632899034945; Wed, 29 Sep 2021 00:03:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632899034; cv=none; d=google.com; s=arc-20160816; b=jSSxg1ZHyF4qHr6MN9jRvfE7l6O7VJcvk8hoKlupbIXPohH8PolhAiyS8oFapISZyt 1uGNc1/UTgTvzvVvi+cQ/Fq7xk21JepQqsKb0sFl8ejB8WkMcjqguDz3/w3/B2+YHG1m p8Pace/U308xAuTWZbQ0Ahnl3tDwtoNnuMKUOhGEsc1lKHGaKspERXCE8AuUjX8WJLbR SDrG/ikAhmt1sQOkoTxee3am0Dv3EwAYm4MWd/XUIPG6Bu/+8LVZQRsOzpOEELHEXzrB /anpoobs/wM5bghQtGtBjFMmJmhm3yJ3SO5zTEF9AB5ZyT13PtvaCK25x+G1/UL45Wsj b1fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=KTmUCd1cAYIfXTQVJ8KqYlfrSfks35BkhKt60Zft1wU=; b=Di/QZgORMXfzmrhF36rI0uBjIqfyrSRIgX1fH/SE0M6YEL5b2H80Xhi8SDBt8kB7E1 m0ti0GbOmyRR2TcTwqm5ChvMPaLpUueZjPXyzYKlaogr8hbhG6d1OKPLcVPVufuV7rCz gYc59RgKGcZtqZDdU7qSwjhm2Iec4lAE4YYxeaiRd0wbPwqO6XZMi7F3PNFOpN4/RoK1 p4aDBfE5CRKK4MJDkn4XN7LIwUH5jDs1uIyPTRIAv4kfnHTFPfYC8/cfjILdXDIKCWpQ ZSYH10GA9kVwrcqHbg9jGQXeh7DY9xGu1bbgsDRRVF5C9XoXvn1pEU1ja7ViaZNlHP59 b6Ig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si1513699pln.458.2021.09.29.00.03.38; Wed, 29 Sep 2021 00:03:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244280AbhI2HDV (ORCPT + 99 others); Wed, 29 Sep 2021 03:03:21 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:55788 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S244462AbhI2HDO (ORCPT ); Wed, 29 Sep 2021 03:03:14 -0400 X-UUID: 0e11f859e6b942f9a53cafb6eecbf6ad-20210929 X-UUID: 0e11f859e6b942f9a53cafb6eecbf6ad-20210929 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1143022976; Wed, 29 Sep 2021 15:01:29 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Wed, 29 Sep 2021 15:01:28 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 29 Sep 2021 15:01:27 +0800 From: Po-Wen Kao To: , , , , , , , , CC: , , , , , , , , , Subject: [PATCH 2/2] scsi: ufs: fix TM request timeout Date: Wed, 29 Sep 2021 15:00:47 +0800 Message-ID: <20210929070047.4223-3-powen.kao@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210929070047.4223-1-powen.kao@mediatek.com> References: <20210929070047.4223-1-powen.kao@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org TM command issued by ufshcd_issue_tm_cmd() inevitably timeout since interrupt handler iterates wrong request list for completion. The issue is fixed by iterating static_rqs instead of rqs to find requests with new interface blk_mq_drv_tagset_busy_iter(). Signed-off-by: Po-Wen Kao --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 3841ab49f556..7a1ea42302b8 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6428,7 +6428,7 @@ static irqreturn_t ufshcd_tmc_handler(struct ufs_hba *hba) spin_lock_irqsave(hba->host->host_lock, flags); ci.pending = ufshcd_readl(hba, REG_UTP_TASK_REQ_DOOR_BELL); - blk_mq_tagset_busy_iter(q->tag_set, ufshcd_compl_tm, &ci); + blk_mq_drv_tagset_busy_iter(q->tag_set, ufshcd_compl_tm, &ci); spin_unlock_irqrestore(hba->host->host_lock, flags); return ci.ncpl ? IRQ_HANDLED : IRQ_NONE; -- 2.18.0