From: Bart Van Assche <bvanassche@acm.org>
To: Ziqi Chen <quic_ziqichen@quicinc.com>,
quic_cang@quicinc.com, mani@kernel.org, beanhuo@micron.com,
avri.altman@wdc.com, junwoo80.lee@samsung.com,
martin.petersen@oracle.com, quic_nguyenb@quicinc.com,
quic_nitirawa@quicinc.com, quic_rampraka@quicinc.com
Cc: linux-scsi@vger.kernel.org, Alim Akhtar <alim.akhtar@samsung.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Peter Wang <peter.wang@mediatek.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Maramaina Naresh <quic_mnaresh@quicinc.com>,
Asutosh Das <quic_asutoshd@quicinc.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: ufs: core: quiesce request queues before check pending cmds
Date: Fri, 7 Jun 2024 06:33:03 -0600 [thread overview]
Message-ID: <7ba3bbb8-a5c3-4ecd-9c2a-c9586c9d6bf2@acm.org> (raw)
In-Reply-To: <1717754818-39863-1-git-send-email-quic_ziqichen@quicinc.com>
On 6/7/24 04:06, Ziqi Chen wrote:
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 21429ee..1afa862 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -1392,7 +1392,7 @@ static int ufshcd_clock_scaling_prepare(struct ufs_hba *hba, u64 timeout_us)
> * make sure that there are no outstanding requests when
> * clock scaling is in progress
> */
> - ufshcd_scsi_block_requests(hba);
> + blk_mq_quiesce_tagset(&hba->host->tag_set);
> mutex_lock(&hba->wb_mutex);
> down_write(&hba->clk_scaling_lock);
>
> @@ -1401,7 +1401,7 @@ static int ufshcd_clock_scaling_prepare(struct ufs_hba *hba, u64 timeout_us)
> ret = -EBUSY;
> up_write(&hba->clk_scaling_lock);
> mutex_unlock(&hba->wb_mutex);
> - ufshcd_scsi_unblock_requests(hba);
> + blk_mq_unquiesce_tagset(&hba->host->tag_set);
> goto out;
> }
>
> @@ -1422,7 +1422,7 @@ static void ufshcd_clock_scaling_unprepare(struct ufs_hba *hba, int err, bool sc
>
> mutex_unlock(&hba->wb_mutex);
>
> - ufshcd_scsi_unblock_requests(hba);
> + blk_mq_unquiesce_tagset(&hba->host->tag_set);
> ufshcd_release(hba);
> }
Why to replace only those ufshcd_scsi_block_requests() /
ufshcd_scsi_unblock_requests() calls? I don't think that it is ever safe to
use these functions instead of blk_mq_quiesce_tagset() /
blk_mq_unquiesce_tagset(). Please replace all ufshcd_scsi_block_requests() /
ufshcd_scsi_unblock_requests() calls and remove the
ufshcd_scsi_*block_requests() functions.
Thanks,
Bart.
next prev parent reply other threads:[~2024-06-07 12:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 10:06 Ziqi Chen
2024-06-07 12:33 ` Bart Van Assche [this message]
2024-06-11 11:02 ` Ziqi Chen
2024-06-11 13:51 ` Bart Van Assche
2024-06-12 6:07 ` Ziqi Chen
2024-06-11 13:54 ` Bart Van Assche
2024-06-20 20:57 ` Bart Van Assche
2024-06-24 9:56 ` Ziqi Chen
2024-06-24 16:29 ` Bart Van Assche
2024-06-25 3:38 ` Peter Wang (王信友)
2024-06-25 16:13 ` Bart Van Assche
2024-06-26 3:52 ` Peter Wang (王信友)
2024-06-26 13:18 ` Ziqi Chen
2024-06-26 16:33 ` Bart Van Assche
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=7ba3bbb8-a5c3-4ecd-9c2a-c9586c9d6bf2@acm.org \
--to=bvanassche@acm.org \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=jejb@linux.ibm.com \
--cc=junwoo80.lee@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=martin.petersen@oracle.com \
--cc=peter.wang@mediatek.com \
--cc=quic_asutoshd@quicinc.com \
--cc=quic_cang@quicinc.com \
--cc=quic_mnaresh@quicinc.com \
--cc=quic_nguyenb@quicinc.com \
--cc=quic_nitirawa@quicinc.com \
--cc=quic_rampraka@quicinc.com \
--cc=quic_ziqichen@quicinc.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®