diff options
author | Tejun Heo <htejun@gmail.com> | 2007-10-16 17:21:24 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-29 06:15:27 -0400 |
commit | 88ff6eafbb2a1c55f0f0e2e16d72e7b10d8ae8a5 (patch) | |
tree | ad6ab294a4f725540bfa24b7a451273b99fa71c1 /include | |
parent | 054a5fbaceb2eb3a31ea843c1cf0b8e10b91478c (diff) |
libata: implement ata_wait_after_reset()
On certain device/controller combination, 0xff status is asserted
after reset and doesn't get cleared during 150ms post-reset wait. As
0xff status is interpreted as no device (for good reasons), this can
lead to misdetection on such cases.
This patch implements ata_wait_after_reset() which replaces the 150ms
sleep and waits upto ATA_TMOUT_FF_WAIT if status is 0xff.
ATA_TMOUT_FF_WAIT is currently 800ms which is enough for
HHD424020F7SV00 to get detected but not enough for Quantum GoVault
drive which is known to take upto 2s.
Without parallel probing, spending 2s on 0xff port would incur too
much delay on ata_piix's which use 0xff to indicate empty port and
doesn't have SCR register, so GoVault needs to wait till parallel
probing.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 2f0fc636b4b6..439d40f86c55 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -235,6 +235,13 @@ enum { | |||
235 | ATA_TMOUT_INTERNAL = 30 * HZ, | 235 | ATA_TMOUT_INTERNAL = 30 * HZ, |
236 | ATA_TMOUT_INTERNAL_QUICK = 5 * HZ, | 236 | ATA_TMOUT_INTERNAL_QUICK = 5 * HZ, |
237 | 237 | ||
238 | /* FIXME: GoVault needs 2s but we can't afford that without | ||
239 | * parallel probing. 800ms is enough for iVDR disk | ||
240 | * HHD424020F7SV00. Increase to 2secs when parallel probing | ||
241 | * is in place. | ||
242 | */ | ||
243 | ATA_TMOUT_FF_WAIT = 4 * HZ / 5, | ||
244 | |||
238 | /* ATA bus states */ | 245 | /* ATA bus states */ |
239 | BUS_UNKNOWN = 0, | 246 | BUS_UNKNOWN = 0, |
240 | BUS_DMA = 1, | 247 | BUS_DMA = 1, |
@@ -800,6 +807,7 @@ extern void ata_host_resume(struct ata_host *host); | |||
800 | extern int ata_ratelimit(void); | 807 | extern int ata_ratelimit(void); |
801 | extern int ata_busy_sleep(struct ata_port *ap, | 808 | extern int ata_busy_sleep(struct ata_port *ap, |
802 | unsigned long timeout_pat, unsigned long timeout); | 809 | unsigned long timeout_pat, unsigned long timeout); |
810 | extern void ata_wait_after_reset(struct ata_port *ap, unsigned long deadline); | ||
803 | extern int ata_wait_ready(struct ata_port *ap, unsigned long deadline); | 811 | extern int ata_wait_ready(struct ata_port *ap, unsigned long deadline); |
804 | extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn, | 812 | extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn, |
805 | void *data, unsigned long delay); | 813 | void *data, unsigned long delay); |