Re: [PATCH v5 3/3] scsi: ufs: sysfs: Make max_number_of_rtt read-write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux