aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h24
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
267enum hsm_task_states { 276enum hsm_task_states {
@@ -294,9 +303,10 @@ struct ata_queued_cmd;
294 303
295/* typedefs */ 304/* typedefs */
296typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); 305typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc);
297typedef void (*ata_probeinit_fn_t)(struct ata_port *); 306typedef void (*ata_probeinit_fn_t)(struct ata_port *ap);
298typedef int (*ata_reset_fn_t)(struct ata_port *, unsigned int *); 307typedef int (*ata_prereset_fn_t)(struct ata_port *ap);
299typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *); 308typedef int (*ata_reset_fn_t)(struct ata_port *ap, unsigned int *classes);
309typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes);
300 310
301struct ata_ioports { 311struct 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);
625extern void ata_std_probeinit(struct ata_port *ap); 635extern void ata_std_probeinit(struct ata_port *ap);
636extern int ata_std_prereset(struct ata_port *ap);
626extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); 637extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes);
627extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); 638extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class);
628extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); 639extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes);
@@ -706,7 +717,7 @@ extern u8 ata_bmdma_status(struct ata_port *ap);
706extern void ata_bmdma_irq_clear(struct ata_port *ap); 717extern void ata_bmdma_irq_clear(struct ata_port *ap);
707extern void ata_bmdma_freeze(struct ata_port *ap); 718extern void ata_bmdma_freeze(struct ata_port *ap);
708extern void ata_bmdma_thaw(struct ata_port *ap); 719extern void ata_bmdma_thaw(struct ata_port *ap);
709extern void ata_bmdma_drive_eh(struct ata_port *ap, 720extern 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);
784extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); 795extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
785extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); 796extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
786 797
787extern void ata_do_eh(struct ata_port *ap, ata_reset_fn_t softreset, 798extern 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