diff options
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 1c167f728fb4..fe5f53943c44 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -262,6 +262,15 @@ enum { | |||
262 | ATA_PROBE_MAX_TRIES = 3, | 262 | ATA_PROBE_MAX_TRIES = 3, |
263 | ATA_EH_RESET_TRIES = 3, | 263 | ATA_EH_RESET_TRIES = 3, |
264 | ATA_EH_DEV_TRIES = 3, | 264 | ATA_EH_DEV_TRIES = 3, |
265 | |||
266 | /* Drive spinup time (time from power-on to the first D2H FIS) | ||
267 | * in msecs - 8s currently. Failing to get ready in this time | ||
268 | * isn't critical. It will result in reset failure for | ||
269 | * controllers which can't wait for the first D2H FIS. libata | ||
270 | * will retry, so it just has to be long enough to spin up | ||
271 | * most devices. | ||
272 | */ | ||
273 | ATA_SPINUP_WAIT = 8000, | ||
265 | }; | 274 | }; |
266 | 275 | ||
267 | enum hsm_task_states { | 276 | enum hsm_task_states { |
@@ -294,9 +303,10 @@ struct ata_queued_cmd; | |||
294 | 303 | ||
295 | /* typedefs */ | 304 | /* typedefs */ |
296 | typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); | 305 | typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); |
297 | typedef void (*ata_probeinit_fn_t)(struct ata_port *); | 306 | typedef void (*ata_probeinit_fn_t)(struct ata_port *ap); |
298 | typedef int (*ata_reset_fn_t)(struct ata_port *, unsigned int *); | 307 | typedef int (*ata_prereset_fn_t)(struct ata_port *ap); |
299 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *); | 308 | typedef int (*ata_reset_fn_t)(struct ata_port *ap, unsigned int *classes); |
309 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes); | ||
300 | 310 | ||
301 | struct ata_ioports { | 311 | struct ata_ioports { |
302 | unsigned long cmd_addr; | 312 | unsigned long cmd_addr; |
@@ -623,6 +633,7 @@ extern int ata_drive_probe_reset(struct ata_port *ap, | |||
623 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, | 633 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, |
624 | ata_postreset_fn_t postreset, unsigned int *classes); | 634 | ata_postreset_fn_t postreset, unsigned int *classes); |
625 | extern void ata_std_probeinit(struct ata_port *ap); | 635 | extern void ata_std_probeinit(struct ata_port *ap); |
636 | extern int ata_std_prereset(struct ata_port *ap); | ||
626 | extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); | 637 | extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); |
627 | extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); | 638 | extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); |
628 | extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); | 639 | extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); |
@@ -706,7 +717,7 @@ extern u8 ata_bmdma_status(struct ata_port *ap); | |||
706 | extern void ata_bmdma_irq_clear(struct ata_port *ap); | 717 | extern void ata_bmdma_irq_clear(struct ata_port *ap); |
707 | extern void ata_bmdma_freeze(struct ata_port *ap); | 718 | extern void ata_bmdma_freeze(struct ata_port *ap); |
708 | extern void ata_bmdma_thaw(struct ata_port *ap); | 719 | extern void ata_bmdma_thaw(struct ata_port *ap); |
709 | extern void ata_bmdma_drive_eh(struct ata_port *ap, | 720 | extern void ata_bmdma_drive_eh(struct ata_port *ap, ata_prereset_fn_t prereset, |
710 | ata_reset_fn_t softreset, | 721 | ata_reset_fn_t softreset, |
711 | ata_reset_fn_t hardreset, | 722 | ata_reset_fn_t hardreset, |
712 | ata_postreset_fn_t postreset); | 723 | ata_postreset_fn_t postreset); |
@@ -784,8 +795,9 @@ extern void ata_eh_thaw_port(struct ata_port *ap); | |||
784 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); | 795 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); |
785 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); | 796 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); |
786 | 797 | ||
787 | extern void ata_do_eh(struct ata_port *ap, ata_reset_fn_t softreset, | 798 | extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, |
788 | ata_reset_fn_t hardreset, ata_postreset_fn_t postreset); | 799 | ata_reset_fn_t softreset, ata_reset_fn_t hardreset, |
800 | ata_postreset_fn_t postreset); | ||
789 | 801 | ||
790 | /* | 802 | /* |
791 | * printk helpers | 803 | * printk helpers |