[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <61984ab3-1bcf-44e4-8b2a-0760af3cefd9@acm.org>
Date: Thu, 23 May 2024 16:05:14 -0700
From: Bart Van Assche <bvanassche@....org>
To: Avri Altman <avri.altman@....com>,
"Martin K . Petersen" <martin.petersen@...cle.com>
Cc: Bean Huo <beanhuo@...ron.com>, Peter Wang <peter.wang@...iatek.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/3] scsi: ufs: sysfs: Make max_number_of_rtt
read-write
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,
Bart.
Powered by blists - more mailing lists