]> git.ipfire.org Git - thirdparty/linux.git/commit
ata: libata-eh: Do not retry reset if the device is gone
authorIgor Pylypiv <ipylypiv@google.com>
Thu, 2 Apr 2026 16:07:05 +0000 (09:07 -0700)
committerNiklas Cassel <cassel@kernel.org>
Thu, 2 Apr 2026 18:18:29 +0000 (20:18 +0200)
commit182caa17360dd48e6df08e18f00ebda0be87ab24
tree944b0d8d03a035ea5fcb8f32ac68e0eb2b43b743
parentd5d286154b6cc1729b5aa0bc579902e2dbe9be5c
ata: libata-eh: Do not retry reset if the device is gone

If a device is hot-unplugged or otherwise disappears during error handling,
ata_eh_reset() may fail with -ENODEV. Currently, the error handler will
continue to retry the reset operation up to max_tries times.

Prevent unnecessary reset retries by exiting the loop early when
ata_do_reset() returns -ENODEV.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/libata-eh.c