diff options
Diffstat (limited to 'include/linux/libata.h')
| -rw-r--r-- | include/linux/libata.h | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index d8cfc72ea9c1..7906d750aa77 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -296,18 +296,8 @@ enum { | |||
| 296 | 296 | ||
| 297 | /* how hard are we gonna try to probe/recover devices */ | 297 | /* how hard are we gonna try to probe/recover devices */ |
| 298 | ATA_PROBE_MAX_TRIES = 3, | 298 | ATA_PROBE_MAX_TRIES = 3, |
| 299 | ATA_EH_RESET_TRIES = 3, | ||
| 300 | ATA_EH_DEV_TRIES = 3, | 299 | ATA_EH_DEV_TRIES = 3, |
| 301 | 300 | ||
| 302 | /* Drive spinup time (time from power-on to the first D2H FIS) | ||
| 303 | * in msecs - 8s currently. Failing to get ready in this time | ||
| 304 | * isn't critical. It will result in reset failure for | ||
| 305 | * controllers which can't wait for the first D2H FIS. libata | ||
| 306 | * will retry, so it just has to be long enough to spin up | ||
| 307 | * most devices. | ||
| 308 | */ | ||
| 309 | ATA_SPINUP_WAIT = 8000, | ||
| 310 | |||
| 311 | /* Horkage types. May be set by libata or controller on drives | 301 | /* Horkage types. May be set by libata or controller on drives |
| 312 | (some horkage may be drive/controller pair dependant */ | 302 | (some horkage may be drive/controller pair dependant */ |
| 313 | 303 | ||
| @@ -348,8 +338,9 @@ struct ata_queued_cmd; | |||
| 348 | 338 | ||
| 349 | /* typedefs */ | 339 | /* typedefs */ |
| 350 | typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); | 340 | typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); |
| 351 | typedef int (*ata_prereset_fn_t)(struct ata_port *ap); | 341 | typedef int (*ata_prereset_fn_t)(struct ata_port *ap, unsigned long deadline); |
| 352 | typedef int (*ata_reset_fn_t)(struct ata_port *ap, unsigned int *classes); | 342 | typedef int (*ata_reset_fn_t)(struct ata_port *ap, unsigned int *classes, |
| 343 | unsigned long deadline); | ||
| 353 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes); | 344 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes); |
| 354 | 345 | ||
| 355 | struct ata_ioports { | 346 | struct ata_ioports { |
| @@ -494,7 +485,6 @@ struct ata_eh_info { | |||
| 494 | unsigned int dev_action[ATA_MAX_DEVICES]; /* dev EH action */ | 485 | unsigned int dev_action[ATA_MAX_DEVICES]; /* dev EH action */ |
| 495 | unsigned int flags; /* ATA_EHI_* flags */ | 486 | unsigned int flags; /* ATA_EHI_* flags */ |
| 496 | 487 | ||
| 497 | unsigned long hotplug_timestamp; | ||
| 498 | unsigned int probe_mask; | 488 | unsigned int probe_mask; |
| 499 | 489 | ||
| 500 | char desc[ATA_EH_DESC_LEN]; | 490 | char desc[ATA_EH_DESC_LEN]; |
| @@ -688,13 +678,17 @@ extern void __sata_phy_reset(struct ata_port *ap); | |||
| 688 | extern void sata_phy_reset(struct ata_port *ap); | 678 | extern void sata_phy_reset(struct ata_port *ap); |
| 689 | extern void ata_bus_reset(struct ata_port *ap); | 679 | extern void ata_bus_reset(struct ata_port *ap); |
| 690 | extern int sata_set_spd(struct ata_port *ap); | 680 | extern int sata_set_spd(struct ata_port *ap); |
| 691 | extern int sata_phy_debounce(struct ata_port *ap, const unsigned long *param); | 681 | extern int sata_phy_debounce(struct ata_port *ap, const unsigned long *param, |
| 692 | extern int sata_phy_resume(struct ata_port *ap, const unsigned long *param); | 682 | unsigned long deadline); |
| 693 | extern int ata_std_prereset(struct ata_port *ap); | 683 | extern int sata_phy_resume(struct ata_port *ap, const unsigned long *param, |
| 694 | extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); | 684 | unsigned long deadline); |
| 695 | extern int sata_port_hardreset(struct ata_port *ap, | 685 | extern int ata_std_prereset(struct ata_port *ap, unsigned long deadline); |
| 696 | const unsigned long *timing); | 686 | extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes, |
| 697 | extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); | 687 | unsigned long deadline); |
| 688 | extern int sata_port_hardreset(struct ata_port *ap, const unsigned long *timing, | ||
| 689 | unsigned long deadline); | ||
| 690 | extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class, | ||
| 691 | unsigned long deadline); | ||
| 698 | extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); | 692 | extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); |
| 699 | extern void ata_port_disable(struct ata_port *); | 693 | extern void ata_port_disable(struct ata_port *); |
| 700 | extern void ata_std_ports(struct ata_ioports *ioaddr); | 694 | extern void ata_std_ports(struct ata_ioports *ioaddr); |
| @@ -750,6 +744,7 @@ extern void ata_host_resume(struct ata_host *host); | |||
| 750 | extern int ata_ratelimit(void); | 744 | extern int ata_ratelimit(void); |
| 751 | extern int ata_busy_sleep(struct ata_port *ap, | 745 | extern int ata_busy_sleep(struct ata_port *ap, |
| 752 | unsigned long timeout_pat, unsigned long timeout); | 746 | unsigned long timeout_pat, unsigned long timeout); |
| 747 | extern int ata_wait_ready(struct ata_port *ap, unsigned long deadline); | ||
| 753 | extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn, | 748 | extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn, |
| 754 | void *data, unsigned long delay); | 749 | void *data, unsigned long delay); |
| 755 | extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, | 750 | extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, |
| @@ -919,12 +914,7 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
| 919 | 914 | ||
| 920 | static inline void __ata_ehi_hotplugged(struct ata_eh_info *ehi) | 915 | static inline void __ata_ehi_hotplugged(struct ata_eh_info *ehi) |
| 921 | { | 916 | { |
| 922 | if (ehi->flags & ATA_EHI_HOTPLUGGED) | ||
| 923 | return; | ||
| 924 | |||
| 925 | ehi->flags |= ATA_EHI_HOTPLUGGED | ATA_EHI_RESUME_LINK; | 917 | ehi->flags |= ATA_EHI_HOTPLUGGED | ATA_EHI_RESUME_LINK; |
| 926 | ehi->hotplug_timestamp = jiffies; | ||
| 927 | |||
| 928 | ehi->action |= ATA_EH_SOFTRESET; | 918 | ehi->action |= ATA_EH_SOFTRESET; |
| 929 | ehi->probe_mask |= (1 << ATA_MAX_DEVICES) - 1; | 919 | ehi->probe_mask |= (1 << ATA_MAX_DEVICES) - 1; |
| 930 | } | 920 | } |
