On 11/10/21 12:04 AM, Adrian Hunter wrote:
On 10/11/2021 02:44, Bart Van Assche wrote:
@@ -2698,8 +2653,11 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
WARN_ONCE(tag < 0, "Invalid tag %d\n", tag);
- if (!down_read_trylock(&hba->clk_scaling_lock))
- return SCSI_MLQUEUE_HOST_BUSY;
+ /*
+ * Allows ufshcd_clock_scaling_prepare() and also the UFS error handler
+ * to wait for prior ufshcd_queuecommand() calls.
+ */
+ rcu_read_lock();
The improvement to flush/drain ufshcd_queuecommand() via RCU should
be a separate patch because it is not dependent on the other changes.
I will split this patch into two patches.
Thanks,
Bart.