Skip to content

Commit 1cca0c3

Browse files
Can Guomartinkpetersen
authored andcommitted
scsi: ufs: Remove a redundant command completion logic in error handler
ufshcd_host_reset_and_restore() anyways completes all pending requests before starts re-probing, so there is no need to complete the command on the highest bit in tr_doorbell in advance. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Stanley Chu <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Can Guo <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 8092782 commit 1cca0c3

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

drivers/scsi/ufs/ufshcd.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6124,19 +6124,6 @@ static void ufshcd_err_handler(struct work_struct *work)
61246124
do_reset:
61256125
/* Fatal errors need reset */
61266126
if (needs_reset) {
6127-
unsigned long max_doorbells = (1UL << hba->nutrs) - 1;
6128-
6129-
/*
6130-
* ufshcd_reset_and_restore() does the link reinitialization
6131-
* which will need atleast one empty doorbell slot to send the
6132-
* device management commands (NOP and query commands).
6133-
* If there is no slot empty at this moment then free up last
6134-
* slot forcefully.
6135-
*/
6136-
if (hba->outstanding_reqs == max_doorbells)
6137-
__ufshcd_transfer_req_compl(hba,
6138-
(1UL << (hba->nutrs - 1)));
6139-
61406127
hba->force_reset = false;
61416128
spin_unlock_irqrestore(hba->host->host_lock, flags);
61426129
err = ufshcd_reset_and_restore(hba);

0 commit comments

Comments
 (0)