Hello, On Wed, Feb 28, 2018 at 03:18:39PM +0800, chenxiang (M) wrote: > If we can introduce a port flags such as ATA_LFLAG_DISABLED or > ATA_EHI_NO_RECOVERY before ata_eh_recover, > it will skip recovery. But we only get device status NODEV from > ata_do_reset which is after ata_eh_recover, i don't > think it is used to introduce a port flags at that time. > From function ata_eh_reset, it seems there are two situations that > end the recovery logic in current code: > 1. Retry 3 times; > 2. Reset function return value -ERESTART, but this return value > seems be specal situation for ATA; So, we have -ERESTART for restarting, -EPIPE for speeding down. We can just add another special return code - say, -ENOENT - to indicate that there's nothing and it shouldn't keep trying. Thanks. -- tejun