From: Avri Altman <Avri.Altman@wdc.com>
To: Bart Van Assche <bvanassche@acm.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Bean Huo <beanhuo@micron.com>,
Peter Wang <peter.wang@mediatek.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v5 3/3] scsi: ufs: sysfs: Make max_number_of_rtt read-write
Date: Fri, 24 May 2024 03:54:24 +0000 [thread overview]
Message-ID: <DM6PR04MB6575A38D05EC447D5E043787FCF52@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <61984ab3-1bcf-44e4-8b2a-0760af3cefd9@acm.org>
>
> On 5/23/24 05:58, Avri Altman wrote:
> > + /* make sure that there are no outstanding requests when rtt is set */
> > + ufshcd_scsi_block_requests(hba);
> > + blk_mq_wait_quiesce_done(&hba->host->tag_set);
> > +
> > + ret = ufshcd_query_attr(hba, UPIU_QUERY_OPCODE_WRITE_ATTR,
> > + QUERY_ATTR_IDN_MAX_NUM_OF_RTT, 0, 0, &rtt);
> > +
> > + ufshcd_scsi_unblock_requests(hba);
>
> The above doesn't look correct to me. ufshcd_scsi_block_requests() does not
> guarantee that all pending commands have finished by the time it returns.
> Please blk_mq_freeze_queue() / blk_mq_unfreeze_queue() instead.
Thanks. Will use those to drain the queues.
Thanks,
Avri
>
> Thanks,
>
> Bart.
prev parent reply other threads:[~2024-05-24 3:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-23 12:58 [PATCH v5 0/3] scsi: ufs: Allow RTT negotiation Avri Altman
2024-05-23 12:58 ` [PATCH v5 1/3] " Avri Altman
2024-05-23 12:58 ` [PATCH v5 2/3] scsi: ufs: Allow platform vendors to set rtt Avri Altman
2024-05-23 13:03 ` Christoph Hellwig
2024-05-23 13:09 ` Avri Altman
2024-05-23 13:11 ` hch
2024-05-24 6:06 ` Peter Wang (王信友)
2024-05-24 13:56 ` Bart Van Assche
2024-05-25 14:55 ` Avri Altman
2024-05-23 12:58 ` [PATCH v5 3/3] scsi: ufs: sysfs: Make max_number_of_rtt read-write Avri Altman
2024-05-23 23:05 ` Bart Van Assche
2024-05-24 3:54 ` Avri Altman [this message]
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=DM6PR04MB6575A38D05EC447D5E043787FCF52@DM6PR04MB6575.namprd04.prod.outlook.com \
--to=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=peter.wang@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).