In ata_generic_reset() while waiting for both master & slave to become

idle the 'mask' variable could be set to 0, resulting in the timeout loop
running for the full 31 seconds.

Handling this case eliminates long hangs on resume on some systems.

Submitted by:		Nate Lawson <nate AT root.org>
This commit is contained in:
Matthew N. Dodd 2005-03-02 03:34:51 +00:00
parent 5a199d9799
commit 6bacdeb7e0

View File

@ -619,8 +619,11 @@ ata_generic_reset(struct ata_channel *ch)
(stat1 == err && lsb == err && msb == err && timeout > 5))
mask &= ~0x02;
}
if (mask == 0 && !(stat0 & ATA_S_BUSY) && !(stat1 & ATA_S_BUSY))
break;
ata_udelay(100000);
}
}
if (bootverbose)
ata_printf(ch, -1,