aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:39 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:39 -0400
commitd6e2955a6b82d2312b5ff885ce13c8ab54d59d96 (patch)
treef8bc72a2f60218f2d14883b6b54b9454499ed158 /include/linux/ide.h
parentde699ad595fb45022d1b049ed91ffd06fdd16c13 (diff)
ide: move IDE{FLOPPY,TAPE}_WAIT_CMD defines to <linux/ide.h>
While at it: * IDE{FLOPPY,TAPE}_WAIT_CMD -> WAIT_{FLOPPY,TAPE}_CMD * Use enum for WAIT_* defines. There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h28
1 files changed, 22 insertions, 6 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 55098eed3b21..a9eced25acce 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -133,12 +133,28 @@ struct ide_io_ports {
133/* 133/*
134 * Timeouts for various operations: 134 * Timeouts for various operations:
135 */ 135 */
136#define WAIT_DRQ (HZ/10) /* 100msec - spec allows up to 20ms */ 136enum {
137#define WAIT_READY (5*HZ) /* 5sec - some laptops are very slow */ 137 /* spec allows up to 20ms */
138#define WAIT_PIDENTIFY (10*HZ) /* 10sec - should be less than 3ms (?), if all ATAPI CD is closed at boot */ 138 WAIT_DRQ = HZ / 10, /* 100ms */
139#define WAIT_WORSTCASE (30*HZ) /* 30sec - worst case when spinning up */ 139 /* some laptops are very slow */
140#define WAIT_CMD (10*HZ) /* 10sec - maximum wait for an IRQ to happen */ 140 WAIT_READY = 5 * HZ, /* 5s */
141#define WAIT_MIN_SLEEP (2*HZ/100) /* 20msec - minimum sleep time */ 141 /* should be less than 3ms (?), if all ATAPI CD is closed at boot */
142 WAIT_PIDENTIFY = 10 * HZ, /* 10s */
143 /* worst case when spinning up */
144 WAIT_WORSTCASE = 30 * HZ, /* 30s */
145 /* maximum wait for an IRQ to happen */
146 WAIT_CMD = 10 * HZ, /* 10s */
147 /* Some drives require a longer IRQ timeout. */
148 WAIT_FLOPPY_CMD = 50 * HZ, /* 50s */
149 /*
150 * Some drives (for example, Seagate STT3401A Travan) require a very
151 * long timeout, because they don't return an interrupt or clear their
152 * BSY bit until after the command completes (even retension commands).
153 */
154 WAIT_TAPE_CMD = 900 * HZ, /* 900s */
155 /* minimum sleep time */
156 WAIT_MIN_SLEEP = HZ / 50, /* 20ms */
157};
142 158
143/* 159/*
144 * Op codes for special requests to be handled by ide_special_rq(). 160 * Op codes for special requests to be handled by ide_special_rq().