]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: ufs: core: Simplify ufshcd_exception_event_handler()
authorBart Van Assche <bvanassche@acm.org>
Tue, 22 Oct 2024 19:31:00 +0000 (12:31 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Oct 2024 19:01:10 +0000 (15:01 -0400)
The ufshcd_scsi_block_requests() and ufshcd_scsi_unblock_requests()
calls were introduced in ufshcd_exception_event_handler() to prevent
that querying the exception event information would time out. Commit
10fe5888a40e ("scsi: ufs: increase the scsi query response timeout")
increased the timeout for querying exception information from 30 ms to
1.5 s and thereby eliminated the risk that a timeout would happen.
Hence, the calls to block and unblock SCSI requests are superfluous.
Remove these calls.

Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Tested-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20241022193130.2733293-5-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c

index 86e745b7e6bb5f5637b5c51d1f698a61ce42ea8f..656a09cd48e49f44dbf87d2816a00ab56c74c460 100644 (file)
@@ -6194,12 +6194,11 @@ static void ufshcd_exception_event_handler(struct work_struct *work)
        u32 status = 0;
        hba = container_of(work, struct ufs_hba, eeh_work);
 
-       ufshcd_scsi_block_requests(hba);
        err = ufshcd_get_ee_status(hba, &status);
        if (err) {
                dev_err(hba->dev, "%s: failed to get exception status %d\n",
                                __func__, err);
-               goto out;
+               return;
        }
 
        trace_ufshcd_exception_event(dev_name(hba->dev), status);
@@ -6211,8 +6210,6 @@ static void ufshcd_exception_event_handler(struct work_struct *work)
                ufshcd_temp_exception_event_handler(hba, status);
 
        ufs_debugfs_exception_event(hba, status);
-out:
-       ufshcd_scsi_unblock_requests(hba);
 }
 
 /* Complete requests that have door-bell cleared */