diff options
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 6e14c27319d5..da5560244787 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -249,6 +249,18 @@ enum { | |||
249 | */ | 249 | */ |
250 | ATA_TMOUT_FF_WAIT = 4 * HZ / 5, | 250 | ATA_TMOUT_FF_WAIT = 4 * HZ / 5, |
251 | 251 | ||
252 | /* Spec mandates to wait for ">= 2ms" before checking status | ||
253 | * after reset. We wait 150ms, because that was the magic | ||
254 | * delay used for ATAPI devices in Hale Landis's ATADRVR, for | ||
255 | * the period of time between when the ATA command register is | ||
256 | * written, and then status is checked. Because waiting for | ||
257 | * "a while" before checking status is fine, post SRST, we | ||
258 | * perform this magic delay here as well. | ||
259 | * | ||
260 | * Old drivers/ide uses the 2mS rule and then waits for ready. | ||
261 | */ | ||
262 | ATA_WAIT_AFTER_RESET_MSECS = 150, | ||
263 | |||
252 | /* ATA bus states */ | 264 | /* ATA bus states */ |
253 | BUS_UNKNOWN = 0, | 265 | BUS_UNKNOWN = 0, |
254 | BUS_DMA = 1, | 266 | BUS_DMA = 1, |
@@ -1351,7 +1363,7 @@ extern u8 ata_sff_check_status(struct ata_port *ap); | |||
1351 | extern u8 ata_sff_altstatus(struct ata_port *ap); | 1363 | extern u8 ata_sff_altstatus(struct ata_port *ap); |
1352 | extern int ata_sff_busy_sleep(struct ata_port *ap, | 1364 | extern int ata_sff_busy_sleep(struct ata_port *ap, |
1353 | unsigned long timeout_pat, unsigned long timeout); | 1365 | unsigned long timeout_pat, unsigned long timeout); |
1354 | extern int ata_sff_wait_ready(struct ata_port *ap, unsigned long deadline); | 1366 | extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline); |
1355 | extern void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf); | 1367 | extern void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf); |
1356 | extern void ata_sff_tf_read(struct ata_port *ap, struct ata_taskfile *tf); | 1368 | extern void ata_sff_tf_read(struct ata_port *ap, struct ata_taskfile *tf); |
1357 | extern void ata_sff_exec_command(struct ata_port *ap, | 1369 | extern void ata_sff_exec_command(struct ata_port *ap, |
@@ -1373,8 +1385,8 @@ extern void ata_sff_thaw(struct ata_port *ap); | |||
1373 | extern int ata_sff_prereset(struct ata_link *link, unsigned long deadline); | 1385 | extern int ata_sff_prereset(struct ata_link *link, unsigned long deadline); |
1374 | extern unsigned int ata_sff_dev_classify(struct ata_device *dev, int present, | 1386 | extern unsigned int ata_sff_dev_classify(struct ata_device *dev, int present, |
1375 | u8 *r_err); | 1387 | u8 *r_err); |
1376 | extern void ata_sff_wait_after_reset(struct ata_port *ap, | 1388 | extern int ata_sff_wait_after_reset(struct ata_link *link, unsigned int devmask, |
1377 | unsigned long deadline); | 1389 | unsigned long deadline); |
1378 | extern int ata_sff_softreset(struct ata_link *link, unsigned int *classes, | 1390 | extern int ata_sff_softreset(struct ata_link *link, unsigned int *classes, |
1379 | unsigned long deadline); | 1391 | unsigned long deadline); |
1380 | extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class, | 1392 | extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class, |