Re: [PATCH 1/2] scsi: ufs: core: Release command resources instead of force-completing
From: Bart Van Assche
Date: Mon Sep 21 2026 - 12:56:55 EST
On 9/20/26 9:37 PM, Stanley Jhu wrote:
On 9/20/26 5:41 PM, Bart Van Assche wrote:
Regarding (3), the UFS driver is a SCSI LLD (low-level driver) and hence
should only do what is specific to the UFS driver. Completing commands
after .eh_host_reset_handler() has been called is the responsibility of
the SCSI core and should not be done by the UFS driver.
Agreed for the path where SCSI EH drove the reset. The case I am unsure
about is the other caller: ufshcd_err_handler() also runs from
hba->eh_work, scheduled by ufshcd_check_errors() on UIC and controller
errors. Those commands have not timed out and are not on
shost->eh_cmd_q, so SCSI EH never finishes them, and the handler leaves
them to the reset path on purpose:
/*
* if host reset is required then skip clearing the pending
* transfers forcefully because they will get cleared during
* host reset and restore
*/
Should those simply wait for the block layer timeout and come back
through SCSI EH?
That sounds good to me.
Thanks,
Bart.