aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h18
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);
1351extern u8 ata_sff_altstatus(struct ata_port *ap); 1363extern u8 ata_sff_altstatus(struct ata_port *ap);
1352extern int ata_sff_busy_sleep(struct ata_port *ap, 1364extern 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);
1354extern int ata_sff_wait_ready(struct ata_port *ap, unsigned long deadline); 1366extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline);
1355extern void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf); 1367extern void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf);
1356extern void ata_sff_tf_read(struct ata_port *ap, struct ata_taskfile *tf); 1368extern void ata_sff_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
1357extern void ata_sff_exec_command(struct ata_port *ap, 1369extern void ata_sff_exec_command(struct ata_port *ap,
@@ -1373,8 +1385,8 @@ extern void ata_sff_thaw(struct ata_port *ap);
1373extern int ata_sff_prereset(struct ata_link *link, unsigned long deadline); 1385extern int ata_sff_prereset(struct ata_link *link, unsigned long deadline);
1374extern unsigned int ata_sff_dev_classify(struct ata_device *dev, int present, 1386extern unsigned int ata_sff_dev_classify(struct ata_device *dev, int present,
1375 u8 *r_err); 1387 u8 *r_err);
1376extern void ata_sff_wait_after_reset(struct ata_port *ap, 1388extern int ata_sff_wait_after_reset(struct ata_link *link, unsigned int devmask,
1377 unsigned long deadline); 1389 unsigned long deadline);
1378extern int ata_sff_softreset(struct ata_link *link, unsigned int *classes, 1390extern int ata_sff_softreset(struct ata_link *link, unsigned int *classes,
1379 unsigned long deadline); 1391 unsigned long deadline);
1380extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class, 1392extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class,