On 11/3/21 12:46 AM, Adrian Hunter wrote:
On 02/11/2021 22:49, Bart Van Assche wrote:
static int ufshcd_clock_scaling_prepare(struct ufs_hba *hba)
{
- #define DOORBELL_CLR_TOUT_US (1000 * 1000) /* 1 sec */
int ret = 0;
+
/*
- * make sure that there are no outstanding requests when
- * clock scaling is in progress
+ * Make sure that there are no outstanding requests while clock scaling
+ * is in progress. Since the error handler may submit TMFs, limit the
+ * time during which to block hba->tmf_queue in order not to block the
+ * UFS error handler.
+ *
+ * Since ufshcd_exec_dev_cmd() and ufshcd_issue_devman_upiu_cmd() lock
+ * the clk_scaling_lock before calling blk_get_request(), lock
+ * clk_scaling_lock before freezing the request queues to prevent a
+ * deadlock.
*/
- ufshcd_scsi_block_requests(hba);
How are requests from LUN queues blocked?
I will add blk_freeze_queue() calls for the LUNs.
Thanks,
Bart.