mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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>
This commit is contained in:
parent
d5d286154b
commit
182caa1736
|
|
@ -3181,7 +3181,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
|
|||
sata_scr_read(link, SCR_STATUS, &sstatus))
|
||||
rc = -ERESTART;
|
||||
|
||||
if (try >= max_tries) {
|
||||
if (try >= max_tries || rc == -ENODEV) {
|
||||
/*
|
||||
* Thaw host port even if reset failed, so that the port
|
||||
* can be retried on the next phy event. This risks
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user