Re: [PATCH V4 1/3] scsi: ufs: Fix error handler clear ua deadlock
From: Adrian Hunter <adrian.hunter@intel.com>
Date: 2021-09-17 17:38:31
From: Adrian Hunter <adrian.hunter@intel.com>
Date: 2021-09-17 17:38:31
On 17/09/21 7:09 pm, Bart Van Assche wrote:
On 9/16/21 10:02 AM, Adrian Hunter wrote:quoted
-static void ufshcd_request_sense_done(struct request *rq, blk_status_t error) +static int ufshcd_request_sense_direct(struct ufs_hba *hba, u8 wlun) {[ ... ]quoted
+ /* The command queue cannot be frozen */ + req = blk_get_request(q, REQ_OP_DRV_OUT, 0);hba->cmd_queue shares a tag set with the request queues associated with SCSI LUNs. Since this blk_get_request() call happens from the context of the error handler before SCSI requests are unblocked, it will hang if all tags are in use for SCSI requests before the error handler starts.
All the commands sent by ufshcd_probe_hba() take the same approach, so no difference there.