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.h127
1 files changed, 75 insertions, 52 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 73112250862c..45fb2967b66d 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -146,6 +146,7 @@ enum {
146 ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ 146 ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */
147 ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */ 147 ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */
148 ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */ 148 ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */
149 ATA_DFLAG_UNLOCK_HPA = (1 << 18), /* unlock HPA */
149 ATA_DFLAG_INIT_MASK = (1 << 24) - 1, 150 ATA_DFLAG_INIT_MASK = (1 << 24) - 1,
150 151
151 ATA_DFLAG_DETACH = (1 << 24), 152 ATA_DFLAG_DETACH = (1 << 24),
@@ -201,12 +202,6 @@ enum {
201 ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity 202 ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity
202 * led */ 203 * led */
203 204
204 /* The following flag belongs to ap->pflags but is kept in
205 * ap->flags because it's referenced in many LLDs and will be
206 * removed in not-too-distant future.
207 */
208 ATA_FLAG_DISABLED = (1 << 23), /* port is disabled, ignore it */
209
210 /* bits 24:31 of ap->flags are reserved for LLD specific flags */ 205 /* bits 24:31 of ap->flags are reserved for LLD specific flags */
211 206
212 207
@@ -255,12 +250,13 @@ enum {
255 ATA_TMOUT_INTERNAL_QUICK = 5000, 250 ATA_TMOUT_INTERNAL_QUICK = 5000,
256 ATA_TMOUT_MAX_PARK = 30000, 251 ATA_TMOUT_MAX_PARK = 30000,
257 252
258 /* FIXME: GoVault needs 2s but we can't afford that without 253 /*
259 * parallel probing. 800ms is enough for iVDR disk 254 * GoVault needs 2s and iVDR disk HHD424020F7SV00 800ms. 2s
260 * HHD424020F7SV00. Increase to 2secs when parallel probing 255 * is too much without parallel probing. Use 2s if parallel
261 * is in place. 256 * probing is available, 800ms otherwise.
262 */ 257 */
263 ATA_TMOUT_FF_WAIT = 800, 258 ATA_TMOUT_FF_WAIT_LONG = 2000,
259 ATA_TMOUT_FF_WAIT = 800,
264 260
265 /* Spec mandates to wait for ">= 2ms" before checking status 261 /* Spec mandates to wait for ">= 2ms" before checking status
266 * after reset. We wait 150ms, because that was the magic 262 * after reset. We wait 150ms, because that was the magic
@@ -339,6 +335,7 @@ enum {
339 ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */ 335 ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */
340 ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ 336 ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */
341 ATA_EHI_QUIET = (1 << 3), /* be quiet */ 337 ATA_EHI_QUIET = (1 << 3), /* be quiet */
338 ATA_EHI_NO_RECOVERY = (1 << 4), /* no recovery */
342 339
343 ATA_EHI_DID_SOFTRESET = (1 << 16), /* already soft-reset this port */ 340 ATA_EHI_DID_SOFTRESET = (1 << 16), /* already soft-reset this port */
344 ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */ 341 ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */
@@ -390,6 +387,7 @@ enum {
390 ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ 387 ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */
391 ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */ 388 ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */
392 ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */ 389 ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */
390 ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */
393 391
394 /* DMA mask for user DMA control: User visible values; DO NOT 392 /* DMA mask for user DMA control: User visible values; DO NOT
395 renumber */ 393 renumber */
@@ -517,7 +515,9 @@ struct ata_ioports {
517 void __iomem *command_addr; 515 void __iomem *command_addr;
518 void __iomem *altstatus_addr; 516 void __iomem *altstatus_addr;
519 void __iomem *ctl_addr; 517 void __iomem *ctl_addr;
518#ifdef CONFIG_ATA_BMDMA
520 void __iomem *bmdma_addr; 519 void __iomem *bmdma_addr;
520#endif /* CONFIG_ATA_BMDMA */
521 void __iomem *scr_addr; 521 void __iomem *scr_addr;
522}; 522};
523#endif /* CONFIG_ATA_SFF */ 523#endif /* CONFIG_ATA_SFF */
@@ -720,15 +720,18 @@ struct ata_port {
720 unsigned int print_id; /* user visible unique port ID */ 720 unsigned int print_id; /* user visible unique port ID */
721 unsigned int port_no; /* 0 based port no. inside the host */ 721 unsigned int port_no; /* 0 based port no. inside the host */
722 722
723 struct ata_prd *prd; /* our SG list */
724 dma_addr_t prd_dma; /* and its DMA mapping */
725
726#ifdef CONFIG_ATA_SFF 723#ifdef CONFIG_ATA_SFF
727 struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */ 724 struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */
728#endif /* CONFIG_ATA_SFF */
729
730 u8 ctl; /* cache of ATA control register */ 725 u8 ctl; /* cache of ATA control register */
731 u8 last_ctl; /* Cache last written value */ 726 u8 last_ctl; /* Cache last written value */
727 struct ata_link* sff_pio_task_link; /* link currently used */
728 struct delayed_work sff_pio_task;
729#ifdef CONFIG_ATA_BMDMA
730 struct ata_bmdma_prd *bmdma_prd; /* BMDMA SG list */
731 dma_addr_t bmdma_prd_dma; /* and its DMA mapping */
732#endif /* CONFIG_ATA_BMDMA */
733#endif /* CONFIG_ATA_SFF */
734
732 unsigned int pio_mask; 735 unsigned int pio_mask;
733 unsigned int mwdma_mask; 736 unsigned int mwdma_mask;
734 unsigned int udma_mask; 737 unsigned int udma_mask;
@@ -750,8 +753,7 @@ struct ata_port {
750 struct ata_host *host; 753 struct ata_host *host;
751 struct device *dev; 754 struct device *dev;
752 755
753 void *port_task_data; 756 struct mutex scsi_scan_mutex;
754 struct delayed_work port_task;
755 struct delayed_work hotplug_task; 757 struct delayed_work hotplug_task;
756 struct work_struct scsi_rescan_task; 758 struct work_struct scsi_rescan_task;
757 759
@@ -848,6 +850,7 @@ struct ata_port_operations {
848 * SFF / taskfile oriented ops 850 * SFF / taskfile oriented ops
849 */ 851 */
850 void (*sff_dev_select)(struct ata_port *ap, unsigned int device); 852 void (*sff_dev_select)(struct ata_port *ap, unsigned int device);
853 void (*sff_set_devctl)(struct ata_port *ap, u8 ctl);
851 u8 (*sff_check_status)(struct ata_port *ap); 854 u8 (*sff_check_status)(struct ata_port *ap);
852 u8 (*sff_check_altstatus)(struct ata_port *ap); 855 u8 (*sff_check_altstatus)(struct ata_port *ap);
853 void (*sff_tf_load)(struct ata_port *ap, const struct ata_taskfile *tf); 856 void (*sff_tf_load)(struct ata_port *ap, const struct ata_taskfile *tf);
@@ -856,15 +859,17 @@ struct ata_port_operations {
856 const struct ata_taskfile *tf); 859 const struct ata_taskfile *tf);
857 unsigned int (*sff_data_xfer)(struct ata_device *dev, 860 unsigned int (*sff_data_xfer)(struct ata_device *dev,
858 unsigned char *buf, unsigned int buflen, int rw); 861 unsigned char *buf, unsigned int buflen, int rw);
859 u8 (*sff_irq_on)(struct ata_port *); 862 void (*sff_irq_on)(struct ata_port *);
863 bool (*sff_irq_check)(struct ata_port *);
860 void (*sff_irq_clear)(struct ata_port *); 864 void (*sff_irq_clear)(struct ata_port *);
865 void (*sff_drain_fifo)(struct ata_queued_cmd *qc);
861 866
867#ifdef CONFIG_ATA_BMDMA
862 void (*bmdma_setup)(struct ata_queued_cmd *qc); 868 void (*bmdma_setup)(struct ata_queued_cmd *qc);
863 void (*bmdma_start)(struct ata_queued_cmd *qc); 869 void (*bmdma_start)(struct ata_queued_cmd *qc);
864 void (*bmdma_stop)(struct ata_queued_cmd *qc); 870 void (*bmdma_stop)(struct ata_queued_cmd *qc);
865 u8 (*bmdma_status)(struct ata_port *ap); 871 u8 (*bmdma_status)(struct ata_port *ap);
866 872#endif /* CONFIG_ATA_BMDMA */
867 void (*drain_fifo)(struct ata_queued_cmd *qc);
868#endif /* CONFIG_ATA_SFF */ 873#endif /* CONFIG_ATA_SFF */
869 874
870 ssize_t (*em_show)(struct ata_port *ap, char *buf); 875 ssize_t (*em_show)(struct ata_port *ap, char *buf);
@@ -933,7 +938,6 @@ static inline int ata_port_is_dummy(struct ata_port *ap)
933 return ap->ops == &ata_dummy_port_ops; 938 return ap->ops == &ata_dummy_port_ops;
934} 939}
935 940
936extern void ata_port_probe(struct ata_port *);
937extern int sata_set_spd(struct ata_link *link); 941extern int sata_set_spd(struct ata_link *link);
938extern int ata_std_prereset(struct ata_link *link, unsigned long deadline); 942extern int ata_std_prereset(struct ata_link *link, unsigned long deadline);
939extern int ata_wait_after_reset(struct ata_link *link, unsigned long deadline, 943extern int ata_wait_after_reset(struct ata_link *link, unsigned long deadline,
@@ -948,7 +952,6 @@ extern int sata_link_hardreset(struct ata_link *link,
948extern int sata_std_hardreset(struct ata_link *link, unsigned int *class, 952extern int sata_std_hardreset(struct ata_link *link, unsigned int *class,
949 unsigned long deadline); 953 unsigned long deadline);
950extern void ata_std_postreset(struct ata_link *link, unsigned int *classes); 954extern void ata_std_postreset(struct ata_link *link, unsigned int *classes);
951extern void ata_port_disable(struct ata_port *);
952 955
953extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports); 956extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports);
954extern struct ata_host *ata_host_alloc_pinfo(struct device *dev, 957extern struct ata_host *ata_host_alloc_pinfo(struct device *dev,
@@ -1004,7 +1007,6 @@ extern unsigned long ata_xfer_mode2mask(u8 xfer_mode);
1004extern int ata_xfer_mode2shift(unsigned long xfer_mode); 1007extern int ata_xfer_mode2shift(unsigned long xfer_mode);
1005extern const char *ata_mode_string(unsigned long xfer_mask); 1008extern const char *ata_mode_string(unsigned long xfer_mask);
1006extern unsigned long ata_id_xfermask(const u16 *id); 1009extern unsigned long ata_id_xfermask(const u16 *id);
1007extern int ata_port_start(struct ata_port *ap);
1008extern int ata_std_qc_defer(struct ata_queued_cmd *qc); 1010extern int ata_std_qc_defer(struct ata_queued_cmd *qc);
1009extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); 1011extern void ata_noop_qc_prep(struct ata_queued_cmd *qc);
1010extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, 1012extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg,
@@ -1024,6 +1026,7 @@ extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd,
1024extern int ata_std_bios_param(struct scsi_device *sdev, 1026extern int ata_std_bios_param(struct scsi_device *sdev,
1025 struct block_device *bdev, 1027 struct block_device *bdev,
1026 sector_t capacity, int geom[]); 1028 sector_t capacity, int geom[]);
1029extern void ata_scsi_unlock_native_capacity(struct scsi_device *sdev);
1027extern int ata_scsi_slave_config(struct scsi_device *sdev); 1030extern int ata_scsi_slave_config(struct scsi_device *sdev);
1028extern void ata_scsi_slave_destroy(struct scsi_device *sdev); 1031extern void ata_scsi_slave_destroy(struct scsi_device *sdev);
1029extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, 1032extern int ata_scsi_change_queue_depth(struct scsi_device *sdev,
@@ -1037,9 +1040,6 @@ extern int ata_cable_sata(struct ata_port *ap);
1037extern int ata_cable_ignore(struct ata_port *ap); 1040extern int ata_cable_ignore(struct ata_port *ap);
1038extern int ata_cable_unknown(struct ata_port *ap); 1041extern int ata_cable_unknown(struct ata_port *ap);
1039 1042
1040extern void ata_pio_queue_task(struct ata_port *ap, void *data,
1041 unsigned long delay);
1042
1043/* Timing helpers */ 1043/* Timing helpers */
1044extern unsigned int ata_pio_need_iordy(const struct ata_device *); 1044extern unsigned int ata_pio_need_iordy(const struct ata_device *);
1045extern const struct ata_timing *ata_timing_find_mode(u8 xfer_mode); 1045extern const struct ata_timing *ata_timing_find_mode(u8 xfer_mode);
@@ -1178,6 +1178,7 @@ extern struct device_attribute *ata_common_sdev_attrs[];
1178 .slave_configure = ata_scsi_slave_config, \ 1178 .slave_configure = ata_scsi_slave_config, \
1179 .slave_destroy = ata_scsi_slave_destroy, \ 1179 .slave_destroy = ata_scsi_slave_destroy, \
1180 .bios_param = ata_std_bios_param, \ 1180 .bios_param = ata_std_bios_param, \
1181 .unlock_native_capacity = ata_scsi_unlock_native_capacity, \
1181 .sdev_attrs = ata_common_sdev_attrs 1182 .sdev_attrs = ata_common_sdev_attrs
1182 1183
1183#define ATA_NCQ_SHT(drv_name) \ 1184#define ATA_NCQ_SHT(drv_name) \
@@ -1441,7 +1442,11 @@ static inline void ata_tf_init(struct ata_device *dev, struct ata_taskfile *tf)
1441{ 1442{
1442 memset(tf, 0, sizeof(*tf)); 1443 memset(tf, 0, sizeof(*tf));
1443 1444
1445#ifdef CONFIG_ATA_SFF
1444 tf->ctl = dev->link->ap->ctl; 1446 tf->ctl = dev->link->ap->ctl;
1447#else
1448 tf->ctl = ATA_DEVCTL_OBS;
1449#endif
1445 if (dev->devno == 0) 1450 if (dev->devno == 0)
1446 tf->device = ATA_DEVICE_OBS; 1451 tf->device = ATA_DEVICE_OBS;
1447 else 1452 else
@@ -1562,7 +1567,6 @@ extern void sata_pmp_error_handler(struct ata_port *ap);
1562#ifdef CONFIG_ATA_SFF 1567#ifdef CONFIG_ATA_SFF
1563 1568
1564extern const struct ata_port_operations ata_sff_port_ops; 1569extern const struct ata_port_operations ata_sff_port_ops;
1565extern const struct ata_port_operations ata_bmdma_port_ops;
1566extern const struct ata_port_operations ata_bmdma32_port_ops; 1570extern const struct ata_port_operations ata_bmdma32_port_ops;
1567 1571
1568/* PIO only, sg_tablesize and dma_boundary limits can be removed */ 1572/* PIO only, sg_tablesize and dma_boundary limits can be removed */
@@ -1571,13 +1575,6 @@ extern const struct ata_port_operations ata_bmdma32_port_ops;
1571 .sg_tablesize = LIBATA_MAX_PRD, \ 1575 .sg_tablesize = LIBATA_MAX_PRD, \
1572 .dma_boundary = ATA_DMA_BOUNDARY 1576 .dma_boundary = ATA_DMA_BOUNDARY
1573 1577
1574#define ATA_BMDMA_SHT(drv_name) \
1575 ATA_BASE_SHT(drv_name), \
1576 .sg_tablesize = LIBATA_MAX_PRD, \
1577 .dma_boundary = ATA_DMA_BOUNDARY
1578
1579extern void ata_sff_qc_prep(struct ata_queued_cmd *qc);
1580extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc);
1581extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); 1578extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device);
1582extern u8 ata_sff_check_status(struct ata_port *ap); 1579extern u8 ata_sff_check_status(struct ata_port *ap);
1583extern void ata_sff_pause(struct ata_port *ap); 1580extern void ata_sff_pause(struct ata_port *ap);
@@ -1595,13 +1592,14 @@ extern unsigned int ata_sff_data_xfer32(struct ata_device *dev,
1595 unsigned char *buf, unsigned int buflen, int rw); 1592 unsigned char *buf, unsigned int buflen, int rw);
1596extern unsigned int ata_sff_data_xfer_noirq(struct ata_device *dev, 1593extern unsigned int ata_sff_data_xfer_noirq(struct ata_device *dev,
1597 unsigned char *buf, unsigned int buflen, int rw); 1594 unsigned char *buf, unsigned int buflen, int rw);
1598extern u8 ata_sff_irq_on(struct ata_port *ap); 1595extern void ata_sff_irq_on(struct ata_port *ap);
1599extern void ata_sff_irq_clear(struct ata_port *ap); 1596extern void ata_sff_irq_clear(struct ata_port *ap);
1600extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, 1597extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
1601 u8 status, int in_wq); 1598 u8 status, int in_wq);
1599extern void ata_sff_queue_pio_task(struct ata_link *link, unsigned long delay);
1602extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); 1600extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc);
1603extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); 1601extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc);
1604extern unsigned int ata_sff_host_intr(struct ata_port *ap, 1602extern unsigned int ata_sff_port_intr(struct ata_port *ap,
1605 struct ata_queued_cmd *qc); 1603 struct ata_queued_cmd *qc);
1606extern irqreturn_t ata_sff_interrupt(int irq, void *dev_instance); 1604extern irqreturn_t ata_sff_interrupt(int irq, void *dev_instance);
1607extern void ata_sff_lost_interrupt(struct ata_port *ap); 1605extern void ata_sff_lost_interrupt(struct ata_port *ap);
@@ -1619,21 +1617,8 @@ extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class,
1619extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes); 1617extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes);
1620extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc); 1618extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc);
1621extern void ata_sff_error_handler(struct ata_port *ap); 1619extern void ata_sff_error_handler(struct ata_port *ap);
1622extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc);
1623extern int ata_sff_port_start(struct ata_port *ap);
1624extern int ata_sff_port_start32(struct ata_port *ap);
1625extern void ata_sff_std_ports(struct ata_ioports *ioaddr); 1620extern void ata_sff_std_ports(struct ata_ioports *ioaddr);
1626extern unsigned long ata_bmdma_mode_filter(struct ata_device *dev,
1627 unsigned long xfer_mask);
1628extern void ata_bmdma_setup(struct ata_queued_cmd *qc);
1629extern void ata_bmdma_start(struct ata_queued_cmd *qc);
1630extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
1631extern u8 ata_bmdma_status(struct ata_port *ap);
1632extern void ata_bus_reset(struct ata_port *ap);
1633
1634#ifdef CONFIG_PCI 1621#ifdef CONFIG_PCI
1635extern int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev);
1636extern int ata_pci_bmdma_init(struct ata_host *host);
1637extern int ata_pci_sff_init_host(struct ata_host *host); 1622extern int ata_pci_sff_init_host(struct ata_host *host);
1638extern int ata_pci_sff_prepare_host(struct pci_dev *pdev, 1623extern int ata_pci_sff_prepare_host(struct pci_dev *pdev,
1639 const struct ata_port_info * const * ppi, 1624 const struct ata_port_info * const * ppi,
@@ -1642,9 +1627,47 @@ extern int ata_pci_sff_activate_host(struct ata_host *host,
1642 irq_handler_t irq_handler, 1627 irq_handler_t irq_handler,
1643 struct scsi_host_template *sht); 1628 struct scsi_host_template *sht);
1644extern int ata_pci_sff_init_one(struct pci_dev *pdev, 1629extern int ata_pci_sff_init_one(struct pci_dev *pdev,
1645 const struct ata_port_info * const * ppi, 1630 const struct ata_port_info * const * ppi,
1646 struct scsi_host_template *sht, void *host_priv); 1631 struct scsi_host_template *sht, void *host_priv, int hflags);
1632#endif /* CONFIG_PCI */
1633
1634#ifdef CONFIG_ATA_BMDMA
1635
1636extern const struct ata_port_operations ata_bmdma_port_ops;
1637
1638#define ATA_BMDMA_SHT(drv_name) \
1639 ATA_BASE_SHT(drv_name), \
1640 .sg_tablesize = LIBATA_MAX_PRD, \
1641 .dma_boundary = ATA_DMA_BOUNDARY
1642
1643extern void ata_bmdma_qc_prep(struct ata_queued_cmd *qc);
1644extern unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc);
1645extern void ata_bmdma_dumb_qc_prep(struct ata_queued_cmd *qc);
1646extern unsigned int ata_bmdma_port_intr(struct ata_port *ap,
1647 struct ata_queued_cmd *qc);
1648extern irqreturn_t ata_bmdma_interrupt(int irq, void *dev_instance);
1649extern void ata_bmdma_error_handler(struct ata_port *ap);
1650extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc);
1651extern void ata_bmdma_irq_clear(struct ata_port *ap);
1652extern void ata_bmdma_setup(struct ata_queued_cmd *qc);
1653extern void ata_bmdma_start(struct ata_queued_cmd *qc);
1654extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
1655extern u8 ata_bmdma_status(struct ata_port *ap);
1656extern int ata_bmdma_port_start(struct ata_port *ap);
1657extern int ata_bmdma_port_start32(struct ata_port *ap);
1658
1659#ifdef CONFIG_PCI
1660extern int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev);
1661extern void ata_pci_bmdma_init(struct ata_host *host);
1662extern int ata_pci_bmdma_prepare_host(struct pci_dev *pdev,
1663 const struct ata_port_info * const * ppi,
1664 struct ata_host **r_host);
1665extern int ata_pci_bmdma_init_one(struct pci_dev *pdev,
1666 const struct ata_port_info * const * ppi,
1667 struct scsi_host_template *sht,
1668 void *host_priv, int hflags);
1647#endif /* CONFIG_PCI */ 1669#endif /* CONFIG_PCI */
1670#endif /* CONFIG_ATA_BMDMA */
1648 1671
1649/** 1672/**
1650 * ata_sff_busy_wait - Wait for a port status register 1673 * ata_sff_busy_wait - Wait for a port status register