Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: ufs: core: Simplify ufshcd_exception_event_handler()

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>

authored by

Bart Van Assche and committed by
Martin K. Petersen
b5d9da58 9a5f6c09

+1 -4
+1 -4
drivers/ufs/core/ufshcd.c
··· 6194 6194 u32 status = 0; 6195 6195 hba = container_of(work, struct ufs_hba, eeh_work); 6196 6196 6197 - ufshcd_scsi_block_requests(hba); 6198 6197 err = ufshcd_get_ee_status(hba, &status); 6199 6198 if (err) { 6200 6199 dev_err(hba->dev, "%s: failed to get exception status %d\n", 6201 6200 __func__, err); 6202 - goto out; 6201 + return; 6203 6202 } 6204 6203 6205 6204 trace_ufshcd_exception_event(dev_name(hba->dev), status); ··· 6210 6211 ufshcd_temp_exception_event_handler(hba, status); 6211 6212 6212 6213 ufs_debugfs_exception_event(hba, status); 6213 - out: 6214 - ufshcd_scsi_unblock_requests(hba); 6215 6214 } 6216 6215 6217 6216 /* Complete requests that have door-bell cleared */