mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Po-Wen Kao <powen.kao@mediatek.com>
To: <linux-block@vger.kernel.org>, <axboe@kernel.dk>,
	<linux-kernel@vger.kernel.org>, <stanley.chu@mediatek.com>,
	<linux-scsi@vger.kernel.org>, <martin.petersen@oracle.com>,
	<avri.altman@wdc.com>, <alim.akhtar@samsung.com>,
	<jejb@linux.ibm.com>
Cc: <peter.wang@mediatek.com>, <chun-hung.wu@mediatek.com>,
	<alice.chao@mediatek.com>, <jonathan.hsu@mediatek.com>,
	<powen.kao@mediatek.com>, <cc.chou@mediatek.com>,
	<chaotian.jing@mediatek.com>, <jiajie.hao@mediatek.com>,
	<wsd_upstream@mediatek.com>, <ed.tsai@mediatek.com>
Subject: [PATCH 2/2] scsi: ufs: fix TM request timeout
Date: Wed, 29 Sep 2021 15:00:47 +0800	[thread overview]
Message-ID: <20210929070047.4223-3-powen.kao@mediatek.com> (raw)
In-Reply-To: <20210929070047.4223-1-powen.kao@mediatek.com>

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 <powen.kao@mediatek.com>
---
 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


  parent reply	other threads:[~2021-09-29  7:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29  7:00 [PATCH 0/2] Fix UFS task management command timeout Po-Wen Kao
2021-09-29  7:00 ` [PATCH 1/2] blk-mq: new busy request iterator for driver Po-Wen Kao
2021-09-29  7:08   ` Christoph Hellwig
2021-09-29  7:00 ` Po-Wen Kao [this message]
2021-09-29  7:39 ` [PATCH 0/2] Fix UFS task management command timeout Avri Altman
2021-09-30  8:50   ` Po-Wen Kao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210929070047.4223-3-powen.kao@mediatek.com \
    --to=powen.kao@mediatek.com \
    --cc=alice.chao@mediatek.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=cc.chou@mediatek.com \
    --cc=chaotian.jing@mediatek.com \
    --cc=chun-hung.wu@mediatek.com \
    --cc=ed.tsai@mediatek.com \
    --cc=jejb@linux.ibm.com \
    --cc=jiajie.hao@mediatek.com \
    --cc=jonathan.hsu@mediatek.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=peter.wang@mediatek.com \
    --cc=stanley.chu@mediatek.com \
    --cc=wsd_upstream@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®