aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/libata.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h87
1 files changed, 52 insertions, 35 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 45fb2967b66d..5a9926b34072 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -37,6 +37,7 @@
37#include <scsi/scsi_host.h> 37#include <scsi/scsi_host.h>
38#include <linux/acpi.h> 38#include <linux/acpi.h>
39#include <linux/cdrom.h> 39#include <linux/cdrom.h>
40#include <linux/sched.h>
40 41
41/* 42/*
42 * Define if arch has non-standard setup. This is a _PCI_ standard 43 * Define if arch has non-standard setup. This is a _PCI_ standard
@@ -136,8 +137,6 @@ enum {
136 ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */ 137 ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */
137 ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */ 138 ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */
138 ATA_DFLAG_AN = (1 << 7), /* AN configured */ 139 ATA_DFLAG_AN = (1 << 7), /* AN configured */
139 ATA_DFLAG_HIPM = (1 << 8), /* device supports HIPM */
140 ATA_DFLAG_DIPM = (1 << 9), /* device supports DIPM */
141 ATA_DFLAG_DMADIR = (1 << 10), /* device requires DMADIR */ 140 ATA_DFLAG_DMADIR = (1 << 10), /* device requires DMADIR */
142 ATA_DFLAG_CFG_MASK = (1 << 12) - 1, 141 ATA_DFLAG_CFG_MASK = (1 << 12) - 1,
143 142
@@ -172,15 +171,12 @@ enum {
172 ATA_LFLAG_NO_RETRY = (1 << 5), /* don't retry this link */ 171 ATA_LFLAG_NO_RETRY = (1 << 5), /* don't retry this link */
173 ATA_LFLAG_DISABLED = (1 << 6), /* link is disabled */ 172 ATA_LFLAG_DISABLED = (1 << 6), /* link is disabled */
174 ATA_LFLAG_SW_ACTIVITY = (1 << 7), /* keep activity stats */ 173 ATA_LFLAG_SW_ACTIVITY = (1 << 7), /* keep activity stats */
174 ATA_LFLAG_NO_LPM = (1 << 8), /* disable LPM on this link */
175 175
176 /* struct ata_port flags */ 176 /* struct ata_port flags */
177 ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */ 177 ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */
178 /* (doesn't imply presence) */ 178 /* (doesn't imply presence) */
179 ATA_FLAG_SATA = (1 << 1), 179 ATA_FLAG_SATA = (1 << 1),
180 ATA_FLAG_NO_LEGACY = (1 << 2), /* no legacy mode check */
181 ATA_FLAG_MMIO = (1 << 3), /* use MMIO, not PIO */
182 ATA_FLAG_SRST = (1 << 4), /* (obsolete) use ATA SRST, not E.D.D. */
183 ATA_FLAG_SATA_RESET = (1 << 5), /* (obsolete) use COMRESET */
184 ATA_FLAG_NO_ATAPI = (1 << 6), /* No ATAPI support */ 180 ATA_FLAG_NO_ATAPI = (1 << 6), /* No ATAPI support */
185 ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */ 181 ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */
186 ATA_FLAG_PIO_LBA48 = (1 << 8), /* Host DMA engine is LBA28 only */ 182 ATA_FLAG_PIO_LBA48 = (1 << 8), /* Host DMA engine is LBA28 only */
@@ -196,11 +192,11 @@ enum {
196 ATA_FLAG_ACPI_SATA = (1 << 17), /* need native SATA ACPI layout */ 192 ATA_FLAG_ACPI_SATA = (1 << 17), /* need native SATA ACPI layout */
197 ATA_FLAG_AN = (1 << 18), /* controller supports AN */ 193 ATA_FLAG_AN = (1 << 18), /* controller supports AN */
198 ATA_FLAG_PMP = (1 << 19), /* controller supports PMP */ 194 ATA_FLAG_PMP = (1 << 19), /* controller supports PMP */
199 ATA_FLAG_IPM = (1 << 20), /* driver can handle IPM */
200 ATA_FLAG_EM = (1 << 21), /* driver supports enclosure 195 ATA_FLAG_EM = (1 << 21), /* driver supports enclosure
201 * management */ 196 * management */
202 ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity 197 ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity
203 * led */ 198 * led */
199 ATA_FLAG_NO_DIPM = (1 << 23), /* host not happy with DIPM */
204 200
205 /* bits 24:31 of ap->flags are reserved for LLD specific flags */ 201 /* bits 24:31 of ap->flags are reserved for LLD specific flags */
206 202
@@ -324,12 +320,11 @@ enum {
324 ATA_EH_HARDRESET = (1 << 2), /* meaningful only in ->prereset */ 320 ATA_EH_HARDRESET = (1 << 2), /* meaningful only in ->prereset */
325 ATA_EH_RESET = ATA_EH_SOFTRESET | ATA_EH_HARDRESET, 321 ATA_EH_RESET = ATA_EH_SOFTRESET | ATA_EH_HARDRESET,
326 ATA_EH_ENABLE_LINK = (1 << 3), 322 ATA_EH_ENABLE_LINK = (1 << 3),
327 ATA_EH_LPM = (1 << 4), /* link power management action */
328 ATA_EH_PARK = (1 << 5), /* unload heads and stop I/O */ 323 ATA_EH_PARK = (1 << 5), /* unload heads and stop I/O */
329 324
330 ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE | ATA_EH_PARK, 325 ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE | ATA_EH_PARK,
331 ATA_EH_ALL_ACTIONS = ATA_EH_REVALIDATE | ATA_EH_RESET | 326 ATA_EH_ALL_ACTIONS = ATA_EH_REVALIDATE | ATA_EH_RESET |
332 ATA_EH_ENABLE_LINK | ATA_EH_LPM, 327 ATA_EH_ENABLE_LINK,
333 328
334 /* ata_eh_info->flags */ 329 /* ata_eh_info->flags */
335 ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */ 330 ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */
@@ -341,7 +336,7 @@ enum {
341 ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */ 336 ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */
342 ATA_EHI_PRINTINFO = (1 << 18), /* print configuration info */ 337 ATA_EHI_PRINTINFO = (1 << 18), /* print configuration info */
343 ATA_EHI_SETMODE = (1 << 19), /* configure transfer mode */ 338 ATA_EHI_SETMODE = (1 << 19), /* configure transfer mode */
344 ATA_EHI_POST_SETMODE = (1 << 20), /* revaildating after setmode */ 339 ATA_EHI_POST_SETMODE = (1 << 20), /* revalidating after setmode */
345 340
346 ATA_EHI_DID_RESET = ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET, 341 ATA_EHI_DID_RESET = ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET,
347 342
@@ -368,7 +363,7 @@ enum {
368 ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 6, 363 ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 6,
369 364
370 /* Horkage types. May be set by libata or controller on drives 365 /* Horkage types. May be set by libata or controller on drives
371 (some horkage may be drive/controller pair dependant */ 366 (some horkage may be drive/controller pair dependent */
372 367
373 ATA_HORKAGE_DIAGNOSTIC = (1 << 0), /* Failed boot diag */ 368 ATA_HORKAGE_DIAGNOSTIC = (1 << 0), /* Failed boot diag */
374 ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ 369 ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */
@@ -377,7 +372,6 @@ enum {
377 ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ 372 ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */
378 ATA_HORKAGE_DISABLE = (1 << 5), /* Disable it */ 373 ATA_HORKAGE_DISABLE = (1 << 5), /* Disable it */
379 ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ 374 ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */
380 ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */
381 ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ 375 ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */
382 ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */ 376 ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */
383 ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */ 377 ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */
@@ -464,6 +458,22 @@ enum ata_completion_errors {
464 AC_ERR_NCQ = (1 << 10), /* marker for offending NCQ qc */ 458 AC_ERR_NCQ = (1 << 10), /* marker for offending NCQ qc */
465}; 459};
466 460
461/*
462 * Link power management policy: If you alter this, you also need to
463 * alter libata-scsi.c (for the ascii descriptions)
464 */
465enum ata_lpm_policy {
466 ATA_LPM_UNKNOWN,
467 ATA_LPM_MAX_POWER,
468 ATA_LPM_MED_POWER,
469 ATA_LPM_MIN_POWER,
470};
471
472enum ata_lpm_hints {
473 ATA_LPM_EMPTY = (1 << 0), /* port empty/probing */
474 ATA_LPM_HIPM = (1 << 1), /* may use HIPM */
475};
476
467/* forward declarations */ 477/* forward declarations */
468struct scsi_device; 478struct scsi_device;
469struct ata_port_operations; 479struct ata_port_operations;
@@ -478,16 +488,6 @@ typedef int (*ata_reset_fn_t)(struct ata_link *link, unsigned int *classes,
478 unsigned long deadline); 488 unsigned long deadline);
479typedef void (*ata_postreset_fn_t)(struct ata_link *link, unsigned int *classes); 489typedef void (*ata_postreset_fn_t)(struct ata_link *link, unsigned int *classes);
480 490
481/*
482 * host pm policy: If you alter this, you also need to alter libata-scsi.c
483 * (for the ascii descriptions)
484 */
485enum link_pm {
486 NOT_AVAILABLE,
487 MIN_POWER,
488 MAX_PERFORMANCE,
489 MEDIUM_POWER,
490};
491extern struct device_attribute dev_attr_link_power_management_policy; 491extern struct device_attribute dev_attr_link_power_management_policy;
492extern struct device_attribute dev_attr_unload_heads; 492extern struct device_attribute dev_attr_unload_heads;
493extern struct device_attribute dev_attr_em_message_type; 493extern struct device_attribute dev_attr_em_message_type;
@@ -530,6 +530,10 @@ struct ata_host {
530 void *private_data; 530 void *private_data;
531 struct ata_port_operations *ops; 531 struct ata_port_operations *ops;
532 unsigned long flags; 532 unsigned long flags;
533
534 struct mutex eh_mutex;
535 struct task_struct *eh_owner;
536
533#ifdef CONFIG_ATA_ACPI 537#ifdef CONFIG_ATA_ACPI
534 acpi_handle acpi_handle; 538 acpi_handle acpi_handle;
535#endif 539#endif
@@ -560,13 +564,13 @@ struct ata_queued_cmd {
560 unsigned int extrabytes; 564 unsigned int extrabytes;
561 unsigned int curbytes; 565 unsigned int curbytes;
562 566
563 struct scatterlist *cursg;
564 unsigned int cursg_ofs;
565
566 struct scatterlist sgent; 567 struct scatterlist sgent;
567 568
568 struct scatterlist *sg; 569 struct scatterlist *sg;
569 570
571 struct scatterlist *cursg;
572 unsigned int cursg_ofs;
573
570 unsigned int err_mask; 574 unsigned int err_mask;
571 struct ata_taskfile result_tf; 575 struct ata_taskfile result_tf;
572 ata_qc_cb_t complete_fn; 576 ata_qc_cb_t complete_fn;
@@ -604,6 +608,7 @@ struct ata_device {
604 union acpi_object *gtf_cache; 608 union acpi_object *gtf_cache;
605 unsigned int gtf_filter; 609 unsigned int gtf_filter;
606#endif 610#endif
611 struct device tdev;
607 /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ 612 /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */
608 u64 n_sectors; /* size of device, if ATA */ 613 u64 n_sectors; /* size of device, if ATA */
609 u64 n_native_sectors; /* native size, if ATA */ 614 u64 n_native_sectors; /* native size, if ATA */
@@ -690,6 +695,7 @@ struct ata_link {
690 struct ata_port *ap; 695 struct ata_port *ap;
691 int pmp; /* port multiplier port # */ 696 int pmp; /* port multiplier port # */
692 697
698 struct device tdev;
693 unsigned int active_tag; /* active tag on this link */ 699 unsigned int active_tag; /* active tag on this link */
694 u32 sactive; /* active NCQ commands */ 700 u32 sactive; /* active NCQ commands */
695 701
@@ -699,6 +705,7 @@ struct ata_link {
699 unsigned int hw_sata_spd_limit; 705 unsigned int hw_sata_spd_limit;
700 unsigned int sata_spd_limit; 706 unsigned int sata_spd_limit;
701 unsigned int sata_spd; /* current SATA PHY speed */ 707 unsigned int sata_spd; /* current SATA PHY speed */
708 enum ata_lpm_policy lpm_policy;
702 709
703 /* record runtime error info, protected by host_set lock */ 710 /* record runtime error info, protected by host_set lock */
704 struct ata_eh_info eh_info; 711 struct ata_eh_info eh_info;
@@ -707,6 +714,8 @@ struct ata_link {
707 714
708 struct ata_device device[ATA_MAX_DEVICES]; 715 struct ata_device device[ATA_MAX_DEVICES];
709}; 716};
717#define ATA_LINK_CLEAR_BEGIN offsetof(struct ata_link, active_tag)
718#define ATA_LINK_CLEAR_END offsetof(struct ata_link, device[0])
710 719
711struct ata_port { 720struct ata_port {
712 struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ 721 struct Scsi_Host *scsi_host; /* our co-allocated scsi host */
@@ -752,6 +761,7 @@ struct ata_port {
752 struct ata_port_stats stats; 761 struct ata_port_stats stats;
753 struct ata_host *host; 762 struct ata_host *host;
754 struct device *dev; 763 struct device *dev;
764 struct device tdev;
755 765
756 struct mutex scsi_scan_mutex; 766 struct mutex scsi_scan_mutex;
757 struct delayed_work hotplug_task; 767 struct delayed_work hotplug_task;
@@ -767,7 +777,7 @@ struct ata_port {
767 777
768 pm_message_t pm_mesg; 778 pm_message_t pm_mesg;
769 int *pm_result; 779 int *pm_result;
770 enum link_pm pm_policy; 780 enum ata_lpm_policy target_lpm_policy;
771 781
772 struct timer_list fastdrain_timer; 782 struct timer_list fastdrain_timer;
773 unsigned long fastdrain_cnt; 783 unsigned long fastdrain_cnt;
@@ -833,8 +843,8 @@ struct ata_port_operations {
833 int (*scr_write)(struct ata_link *link, unsigned int sc_reg, u32 val); 843 int (*scr_write)(struct ata_link *link, unsigned int sc_reg, u32 val);
834 void (*pmp_attach)(struct ata_port *ap); 844 void (*pmp_attach)(struct ata_port *ap);
835 void (*pmp_detach)(struct ata_port *ap); 845 void (*pmp_detach)(struct ata_port *ap);
836 int (*enable_pm)(struct ata_port *ap, enum link_pm policy); 846 int (*set_lpm)(struct ata_link *link, enum ata_lpm_policy policy,
837 void (*disable_pm)(struct ata_port *ap); 847 unsigned hints);
838 848
839 /* 849 /*
840 * Start, stop, suspend and resume 850 * Start, stop, suspend and resume
@@ -946,6 +956,8 @@ extern int sata_link_debounce(struct ata_link *link,
946 const unsigned long *params, unsigned long deadline); 956 const unsigned long *params, unsigned long deadline);
947extern int sata_link_resume(struct ata_link *link, const unsigned long *params, 957extern int sata_link_resume(struct ata_link *link, const unsigned long *params,
948 unsigned long deadline); 958 unsigned long deadline);
959extern int sata_link_scr_lpm(struct ata_link *link, enum ata_lpm_policy policy,
960 bool spm_wakeup);
949extern int sata_link_hardreset(struct ata_link *link, 961extern int sata_link_hardreset(struct ata_link *link,
950 const unsigned long *timing, unsigned long deadline, 962 const unsigned long *timing, unsigned long deadline,
951 bool *online, int (*check_ready)(struct ata_link *)); 963 bool *online, int (*check_ready)(struct ata_link *));
@@ -968,7 +980,7 @@ extern void ata_host_init(struct ata_host *, struct device *,
968 unsigned long, struct ata_port_operations *); 980 unsigned long, struct ata_port_operations *);
969extern int ata_scsi_detect(struct scsi_host_template *sht); 981extern int ata_scsi_detect(struct scsi_host_template *sht);
970extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); 982extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
971extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); 983extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd);
972extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev, 984extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev,
973 int cmd, void __user *arg); 985 int cmd, void __user *arg);
974extern void ata_sas_port_destroy(struct ata_port *); 986extern void ata_sas_port_destroy(struct ata_port *);
@@ -978,8 +990,7 @@ extern int ata_sas_port_init(struct ata_port *);
978extern int ata_sas_port_start(struct ata_port *ap); 990extern int ata_sas_port_start(struct ata_port *ap);
979extern void ata_sas_port_stop(struct ata_port *ap); 991extern void ata_sas_port_stop(struct ata_port *ap);
980extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *); 992extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *);
981extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), 993extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap);
982 struct ata_port *ap);
983extern int sata_scr_valid(struct ata_link *link); 994extern int sata_scr_valid(struct ata_link *link);
984extern int sata_scr_read(struct ata_link *link, int reg, u32 *val); 995extern int sata_scr_read(struct ata_link *link, int reg, u32 *val);
985extern int sata_scr_write(struct ata_link *link, int reg, u32 val); 996extern int sata_scr_write(struct ata_link *link, int reg, u32 val);
@@ -991,8 +1002,9 @@ extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg);
991extern void ata_host_resume(struct ata_host *host); 1002extern void ata_host_resume(struct ata_host *host);
992#endif 1003#endif
993extern int ata_ratelimit(void); 1004extern int ata_ratelimit(void);
994extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, 1005extern void ata_msleep(struct ata_port *ap, unsigned int msecs);
995 unsigned long interval, unsigned long timeout); 1006extern u32 ata_wait_register(struct ata_port *ap, void __iomem *reg, u32 mask,
1007 u32 val, unsigned long interval, unsigned long timeout);
996extern int atapi_cmd_type(u8 opcode); 1008extern int atapi_cmd_type(u8 opcode);
997extern void ata_tf_to_fis(const struct ata_taskfile *tf, 1009extern void ata_tf_to_fis(const struct ata_taskfile *tf,
998 u8 pmp, int is_cmd, u8 *fis); 1010 u8 pmp, int is_cmd, u8 *fis);
@@ -1021,8 +1033,7 @@ extern unsigned int ata_do_dev_read_id(struct ata_device *dev,
1021 struct ata_taskfile *tf, u16 *id); 1033 struct ata_taskfile *tf, u16 *id);
1022extern void ata_qc_complete(struct ata_queued_cmd *qc); 1034extern void ata_qc_complete(struct ata_queued_cmd *qc);
1023extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active); 1035extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active);
1024extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, 1036extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd);
1025 void (*done)(struct scsi_cmnd *));
1026extern int ata_std_bios_param(struct scsi_device *sdev, 1037extern int ata_std_bios_param(struct scsi_device *sdev,
1027 struct block_device *bdev, 1038 struct block_device *bdev,
1028 sector_t capacity, int geom[]); 1039 sector_t capacity, int geom[]);
@@ -1033,6 +1044,8 @@ extern int ata_scsi_change_queue_depth(struct scsi_device *sdev,
1033 int queue_depth, int reason); 1044 int queue_depth, int reason);
1034extern struct ata_device *ata_dev_pair(struct ata_device *adev); 1045extern struct ata_device *ata_dev_pair(struct ata_device *adev);
1035extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev); 1046extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev);
1047extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap);
1048extern void ata_scsi_cmd_error_handler(struct Scsi_Host *host, struct ata_port *ap, struct list_head *eh_q);
1036 1049
1037extern int ata_cable_40wire(struct ata_port *ap); 1050extern int ata_cable_40wire(struct ata_port *ap);
1038extern int ata_cable_80wire(struct ata_port *ap); 1051extern int ata_cable_80wire(struct ata_port *ap);
@@ -1138,6 +1151,7 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
1138 ata_reset_fn_t softreset, ata_reset_fn_t hardreset, 1151 ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
1139 ata_postreset_fn_t postreset); 1152 ata_postreset_fn_t postreset);
1140extern void ata_std_error_handler(struct ata_port *ap); 1153extern void ata_std_error_handler(struct ata_port *ap);
1154extern int ata_link_nr_enabled(struct ata_link *link);
1141 1155
1142/* 1156/*
1143 * Base operations to inherit from and initializers for sht 1157 * Base operations to inherit from and initializers for sht
@@ -1596,6 +1610,9 @@ extern void ata_sff_irq_on(struct ata_port *ap);
1596extern void ata_sff_irq_clear(struct ata_port *ap); 1610extern void ata_sff_irq_clear(struct ata_port *ap);
1597extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, 1611extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
1598 u8 status, int in_wq); 1612 u8 status, int in_wq);
1613extern void ata_sff_queue_work(struct work_struct *work);
1614extern void ata_sff_queue_delayed_work(struct delayed_work *dwork,
1615 unsigned long delay);
1599extern void ata_sff_queue_pio_task(struct ata_link *link, unsigned long delay); 1616extern void ata_sff_queue_pio_task(struct ata_link *link, unsigned long delay);
1600extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); 1617extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc);
1601extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); 1618extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc);