On Wed, 2024-09-25 at 09:56 -0700, Bart Van Assche wrote: > > > ufshcd_transfer_rsp_status() only has one caller, namely > ufshcd_compl_one_cqe(). The previous patch makes sure that that > ufshcd_compl_one_cqe() is not called if a SCSI command is aborted. So > why does this patch modify how OCS_ABORTED is processed? Is this > patch > necessary or can it perhaps be dropped? > > Thanks, > > Bart. Hi Bart, Because in Legacy SDB mode, the error handler still has the chance to call ufshcd_compl_one_cqe(); The call flow is as follows: ufshcd_err_handler() ufshcd_abort_all() ufshcd_abort_one() ufshcd_try_to_abort_task() // mediatek controller fill OCS: ABORTED ufshcd_complete_requests() ufshcd_transfer_req_compl() ufshcd_poll() get outstanding_lock clear outstanding_reqs tag release outstanding_lock __ufshcd_transfer_req_compl() ufshcd_compl_one_cqe() cmd->result = DID_REQUEUE // mediatek need quirk change DID_ABORT to DID_REQUEUE ufshcd_release_scsi_cmd() scsi_done() Thanks. Peter