Message ID | 20240523125827.818-1-avri.altman@wdc.com |
---|---|
Headers | show |
Series | scsi: ufs: Allow RTT negotiation | expand |
> > 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.