Re: [PATCH] ata: libata-eh: Do not retry reset if the device is gone

Igor Pylypiv
2026-04-02T15:34:09Z

On Thu, Apr 02, 2026 at 10:55:41AM +0200, Niklas Cassel wrote:
> 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.
>

Thank you for catching this, Niklas!

Yes, it should be ata_do_reset(). I'll send a V2 to fix the function name.

Thanks,
Igor
>
> 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