Re: [PATCH] ata: libata-eh: Do not retry reset if the device is gone
From: Niklas Cassel
Date: Thu Apr 02 2026 - 05:02:35 EST
On Wed, Apr 01, 2026 at 06:11:01PM -0700, Igor Pylypiv wrote:
> 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_eh_reset() returns -ENODEV.
ata_do_reset() ?
The loop is inside ata_eh_reset(), so it sounds a bit weird to exit
the loop early if the function itself returns -ENODEV.
I guess you could also write it like:
Prevent unnecessary reset retries by exiting the loop early when
a callee in ata_eh_reset() returns -ENODEV.
Kind regards,
Niklas