diff options
Diffstat (limited to 'include/linux/libata.h')
| -rw-r--r-- | include/linux/libata.h | 127 |
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 | ||
| 936 | extern void ata_port_probe(struct ata_port *); | ||
| 937 | extern int sata_set_spd(struct ata_link *link); | 941 | extern int sata_set_spd(struct ata_link *link); |
| 938 | extern int ata_std_prereset(struct ata_link *link, unsigned long deadline); | 942 | extern int ata_std_prereset(struct ata_link *link, unsigned long deadline); |
| 939 | extern int ata_wait_after_reset(struct ata_link *link, unsigned long deadline, | 943 | extern 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, | |||
| 948 | extern int sata_std_hardreset(struct ata_link *link, unsigned int *class, | 952 | extern int sata_std_hardreset(struct ata_link *link, unsigned int *class, |
| 949 | unsigned long deadline); | 953 | unsigned long deadline); |
| 950 | extern void ata_std_postreset(struct ata_link *link, unsigned int *classes); | 954 | extern void ata_std_postreset(struct ata_link *link, unsigned int *classes); |
| 951 | extern void ata_port_disable(struct ata_port *); | ||
| 952 | 955 | ||
| 953 | extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports); | 956 | extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports); |
| 954 | extern struct ata_host *ata_host_alloc_pinfo(struct device *dev, | 957 | extern struct ata_host *ata_host_alloc_pinfo(struct device *dev, |
| @@ -1004,7 +1007,6 @@ extern unsigned long ata_xfer_mode2mask(u8 xfer_mode); | |||
| 1004 | extern int ata_xfer_mode2shift(unsigned long xfer_mode); | 1007 | extern int ata_xfer_mode2shift(unsigned long xfer_mode); |
| 1005 | extern const char *ata_mode_string(unsigned long xfer_mask); | 1008 | extern const char *ata_mode_string(unsigned long xfer_mask); |
| 1006 | extern unsigned long ata_id_xfermask(const u16 *id); | 1009 | extern unsigned long ata_id_xfermask(const u16 *id); |
| 1007 | extern int ata_port_start(struct ata_port *ap); | ||
| 1008 | extern int ata_std_qc_defer(struct ata_queued_cmd *qc); | 1010 | extern int ata_std_qc_defer(struct ata_queued_cmd *qc); |
| 1009 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); | 1011 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); |
| 1010 | extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, | 1012 | extern 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, | |||
| 1024 | extern int ata_std_bios_param(struct scsi_device *sdev, | 1026 | extern 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[]); |
| 1029 | extern void ata_scsi_unlock_native_capacity(struct scsi_device *sdev); | ||
| 1027 | extern int ata_scsi_slave_config(struct scsi_device *sdev); | 1030 | extern int ata_scsi_slave_config(struct scsi_device *sdev); |
| 1028 | extern void ata_scsi_slave_destroy(struct scsi_device *sdev); | 1031 | extern void ata_scsi_slave_destroy(struct scsi_device *sdev); |
| 1029 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, | 1032 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, |
| @@ -1037,9 +1040,6 @@ extern int ata_cable_sata(struct ata_port *ap); | |||
| 1037 | extern int ata_cable_ignore(struct ata_port *ap); | 1040 | extern int ata_cable_ignore(struct ata_port *ap); |
| 1038 | extern int ata_cable_unknown(struct ata_port *ap); | 1041 | extern int ata_cable_unknown(struct ata_port *ap); |
| 1039 | 1042 | ||
| 1040 | extern void ata_pio_queue_task(struct ata_port *ap, void *data, | ||
| 1041 | unsigned long delay); | ||
| 1042 | |||
| 1043 | /* Timing helpers */ | 1043 | /* Timing helpers */ |
| 1044 | extern unsigned int ata_pio_need_iordy(const struct ata_device *); | 1044 | extern unsigned int ata_pio_need_iordy(const struct ata_device *); |
| 1045 | extern const struct ata_timing *ata_timing_find_mode(u8 xfer_mode); | 1045 | extern 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 | ||
| 1564 | extern const struct ata_port_operations ata_sff_port_ops; | 1569 | extern const struct ata_port_operations ata_sff_port_ops; |
| 1565 | extern const struct ata_port_operations ata_bmdma_port_ops; | ||
| 1566 | extern const struct ata_port_operations ata_bmdma32_port_ops; | 1570 | extern 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 | |||
| 1579 | extern void ata_sff_qc_prep(struct ata_queued_cmd *qc); | ||
| 1580 | extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); | ||
| 1581 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); | 1578 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); |
| 1582 | extern u8 ata_sff_check_status(struct ata_port *ap); | 1579 | extern u8 ata_sff_check_status(struct ata_port *ap); |
| 1583 | extern void ata_sff_pause(struct ata_port *ap); | 1580 | extern 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); |
| 1596 | extern unsigned int ata_sff_data_xfer_noirq(struct ata_device *dev, | 1593 | extern 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); |
| 1598 | extern u8 ata_sff_irq_on(struct ata_port *ap); | 1595 | extern void ata_sff_irq_on(struct ata_port *ap); |
| 1599 | extern void ata_sff_irq_clear(struct ata_port *ap); | 1596 | extern void ata_sff_irq_clear(struct ata_port *ap); |
| 1600 | extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, | 1597 | extern 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); |
| 1599 | extern void ata_sff_queue_pio_task(struct ata_link *link, unsigned long delay); | ||
| 1602 | extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); | 1600 | extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); |
| 1603 | extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); | 1601 | extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); |
| 1604 | extern unsigned int ata_sff_host_intr(struct ata_port *ap, | 1602 | extern unsigned int ata_sff_port_intr(struct ata_port *ap, |
| 1605 | struct ata_queued_cmd *qc); | 1603 | struct ata_queued_cmd *qc); |
| 1606 | extern irqreturn_t ata_sff_interrupt(int irq, void *dev_instance); | 1604 | extern irqreturn_t ata_sff_interrupt(int irq, void *dev_instance); |
| 1607 | extern void ata_sff_lost_interrupt(struct ata_port *ap); | 1605 | extern 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, | |||
| 1619 | extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes); | 1617 | extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes); |
| 1620 | extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc); | 1618 | extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc); |
| 1621 | extern void ata_sff_error_handler(struct ata_port *ap); | 1619 | extern void ata_sff_error_handler(struct ata_port *ap); |
| 1622 | extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc); | ||
| 1623 | extern int ata_sff_port_start(struct ata_port *ap); | ||
| 1624 | extern int ata_sff_port_start32(struct ata_port *ap); | ||
| 1625 | extern void ata_sff_std_ports(struct ata_ioports *ioaddr); | 1620 | extern void ata_sff_std_ports(struct ata_ioports *ioaddr); |
| 1626 | extern unsigned long ata_bmdma_mode_filter(struct ata_device *dev, | ||
| 1627 | unsigned long xfer_mask); | ||
| 1628 | extern void ata_bmdma_setup(struct ata_queued_cmd *qc); | ||
| 1629 | extern void ata_bmdma_start(struct ata_queued_cmd *qc); | ||
| 1630 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | ||
| 1631 | extern u8 ata_bmdma_status(struct ata_port *ap); | ||
| 1632 | extern void ata_bus_reset(struct ata_port *ap); | ||
| 1633 | |||
| 1634 | #ifdef CONFIG_PCI | 1621 | #ifdef CONFIG_PCI |
| 1635 | extern int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev); | ||
| 1636 | extern int ata_pci_bmdma_init(struct ata_host *host); | ||
| 1637 | extern int ata_pci_sff_init_host(struct ata_host *host); | 1622 | extern int ata_pci_sff_init_host(struct ata_host *host); |
| 1638 | extern int ata_pci_sff_prepare_host(struct pci_dev *pdev, | 1623 | extern 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); |
| 1644 | extern int ata_pci_sff_init_one(struct pci_dev *pdev, | 1629 | extern 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 | |||
| 1636 | extern 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 | |||
| 1643 | extern void ata_bmdma_qc_prep(struct ata_queued_cmd *qc); | ||
| 1644 | extern unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc); | ||
| 1645 | extern void ata_bmdma_dumb_qc_prep(struct ata_queued_cmd *qc); | ||
| 1646 | extern unsigned int ata_bmdma_port_intr(struct ata_port *ap, | ||
| 1647 | struct ata_queued_cmd *qc); | ||
| 1648 | extern irqreturn_t ata_bmdma_interrupt(int irq, void *dev_instance); | ||
| 1649 | extern void ata_bmdma_error_handler(struct ata_port *ap); | ||
| 1650 | extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc); | ||
| 1651 | extern void ata_bmdma_irq_clear(struct ata_port *ap); | ||
| 1652 | extern void ata_bmdma_setup(struct ata_queued_cmd *qc); | ||
| 1653 | extern void ata_bmdma_start(struct ata_queued_cmd *qc); | ||
| 1654 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | ||
| 1655 | extern u8 ata_bmdma_status(struct ata_port *ap); | ||
| 1656 | extern int ata_bmdma_port_start(struct ata_port *ap); | ||
| 1657 | extern int ata_bmdma_port_start32(struct ata_port *ap); | ||
| 1658 | |||
| 1659 | #ifdef CONFIG_PCI | ||
| 1660 | extern int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev); | ||
| 1661 | extern void ata_pci_bmdma_init(struct ata_host *host); | ||
| 1662 | extern int ata_pci_bmdma_prepare_host(struct pci_dev *pdev, | ||
| 1663 | const struct ata_port_info * const * ppi, | ||
| 1664 | struct ata_host **r_host); | ||
| 1665 | extern 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 |
