diff options
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index dc18b87ed722..3d501db36a26 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -209,6 +209,7 @@ enum { | |||
209 | 209 | ||
210 | /* bits 24:31 of ap->flags are reserved for LLD specific flags */ | 210 | /* bits 24:31 of ap->flags are reserved for LLD specific flags */ |
211 | 211 | ||
212 | |||
212 | /* struct ata_port pflags */ | 213 | /* struct ata_port pflags */ |
213 | ATA_PFLAG_EH_PENDING = (1 << 0), /* EH pending */ | 214 | ATA_PFLAG_EH_PENDING = (1 << 0), /* EH pending */ |
214 | ATA_PFLAG_EH_IN_PROGRESS = (1 << 1), /* EH in progress */ | 215 | ATA_PFLAG_EH_IN_PROGRESS = (1 << 1), /* EH in progress */ |
@@ -225,6 +226,9 @@ enum { | |||
225 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ | 226 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ |
226 | ATA_PFLAG_INIT_GTM_VALID = (1 << 19), /* initial gtm data valid */ | 227 | ATA_PFLAG_INIT_GTM_VALID = (1 << 19), /* initial gtm data valid */ |
227 | 228 | ||
229 | ATA_PFLAG_PIO32 = (1 << 20), /* 32bit PIO */ | ||
230 | ATA_PFLAG_PIO32CHANGE = (1 << 21), /* 32bit PIO can be turned on/off */ | ||
231 | |||
228 | /* struct ata_queued_cmd flags */ | 232 | /* struct ata_queued_cmd flags */ |
229 | ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ | 233 | ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ |
230 | ATA_QCFLAG_DMAMAP = (1 << 1), /* SG table is DMA mapped */ | 234 | ATA_QCFLAG_DMAMAP = (1 << 1), /* SG table is DMA mapped */ |
@@ -379,7 +383,7 @@ enum { | |||
379 | ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */ | 383 | ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */ |
380 | ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands | 384 | ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands |
381 | not multiple of 16 bytes */ | 385 | not multiple of 16 bytes */ |
382 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */ | 386 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firmware update warning */ |
383 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ | 387 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ |
384 | 388 | ||
385 | /* DMA mask for user DMA control: User visible values; DO NOT | 389 | /* DMA mask for user DMA control: User visible values; DO NOT |
@@ -689,7 +693,10 @@ struct ata_port { | |||
689 | struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ | 693 | struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ |
690 | struct ata_port_operations *ops; | 694 | struct ata_port_operations *ops; |
691 | spinlock_t *lock; | 695 | spinlock_t *lock; |
696 | /* Flags owned by the EH context. Only EH should touch these once the | ||
697 | port is active */ | ||
692 | unsigned long flags; /* ATA_FLAG_xxx */ | 698 | unsigned long flags; /* ATA_FLAG_xxx */ |
699 | /* Flags that change dynamically, protected by ap->lock */ | ||
693 | unsigned int pflags; /* ATA_PFLAG_xxx */ | 700 | unsigned int pflags; /* ATA_PFLAG_xxx */ |
694 | unsigned int print_id; /* user visible unique port ID */ | 701 | unsigned int print_id; /* user visible unique port ID */ |
695 | unsigned int port_no; /* 0 based port no. inside the host */ | 702 | unsigned int port_no; /* 0 based port no. inside the host */ |
@@ -795,6 +802,7 @@ struct ata_port_operations { | |||
795 | ata_reset_fn_t pmp_hardreset; | 802 | ata_reset_fn_t pmp_hardreset; |
796 | ata_postreset_fn_t pmp_postreset; | 803 | ata_postreset_fn_t pmp_postreset; |
797 | void (*error_handler)(struct ata_port *ap); | 804 | void (*error_handler)(struct ata_port *ap); |
805 | void (*lost_interrupt)(struct ata_port *ap); | ||
798 | void (*post_internal_cmd)(struct ata_queued_cmd *qc); | 806 | void (*post_internal_cmd)(struct ata_queued_cmd *qc); |
799 | 807 | ||
800 | /* | 808 | /* |
@@ -836,6 +844,8 @@ struct ata_port_operations { | |||
836 | void (*bmdma_start)(struct ata_queued_cmd *qc); | 844 | void (*bmdma_start)(struct ata_queued_cmd *qc); |
837 | void (*bmdma_stop)(struct ata_queued_cmd *qc); | 845 | void (*bmdma_stop)(struct ata_queued_cmd *qc); |
838 | u8 (*bmdma_status)(struct ata_port *ap); | 846 | u8 (*bmdma_status)(struct ata_port *ap); |
847 | |||
848 | void (*drain_fifo)(struct ata_queued_cmd *qc); | ||
839 | #endif /* CONFIG_ATA_SFF */ | 849 | #endif /* CONFIG_ATA_SFF */ |
840 | 850 | ||
841 | ssize_t (*em_show)(struct ata_port *ap, char *buf); | 851 | ssize_t (*em_show)(struct ata_port *ap, char *buf); |
@@ -1008,6 +1018,9 @@ extern int ata_cable_sata(struct ata_port *ap); | |||
1008 | extern int ata_cable_ignore(struct ata_port *ap); | 1018 | extern int ata_cable_ignore(struct ata_port *ap); |
1009 | extern int ata_cable_unknown(struct ata_port *ap); | 1019 | extern int ata_cable_unknown(struct ata_port *ap); |
1010 | 1020 | ||
1021 | extern void ata_pio_queue_task(struct ata_port *ap, void *data, | ||
1022 | unsigned long delay); | ||
1023 | |||
1011 | /* Timing helpers */ | 1024 | /* Timing helpers */ |
1012 | extern unsigned int ata_pio_need_iordy(const struct ata_device *); | 1025 | extern unsigned int ata_pio_need_iordy(const struct ata_device *); |
1013 | extern const struct ata_timing *ata_timing_find_mode(u8 xfer_mode); | 1026 | extern const struct ata_timing *ata_timing_find_mode(u8 xfer_mode); |
@@ -1572,6 +1585,7 @@ extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); | |||
1572 | extern unsigned int ata_sff_host_intr(struct ata_port *ap, | 1585 | extern unsigned int ata_sff_host_intr(struct ata_port *ap, |
1573 | struct ata_queued_cmd *qc); | 1586 | struct ata_queued_cmd *qc); |
1574 | extern irqreturn_t ata_sff_interrupt(int irq, void *dev_instance); | 1587 | extern irqreturn_t ata_sff_interrupt(int irq, void *dev_instance); |
1588 | extern void ata_sff_lost_interrupt(struct ata_port *ap); | ||
1575 | extern void ata_sff_freeze(struct ata_port *ap); | 1589 | extern void ata_sff_freeze(struct ata_port *ap); |
1576 | extern void ata_sff_thaw(struct ata_port *ap); | 1590 | extern void ata_sff_thaw(struct ata_port *ap); |
1577 | extern int ata_sff_prereset(struct ata_link *link, unsigned long deadline); | 1591 | extern int ata_sff_prereset(struct ata_link *link, unsigned long deadline); |
@@ -1584,9 +1598,11 @@ extern int ata_sff_softreset(struct ata_link *link, unsigned int *classes, | |||
1584 | extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class, | 1598 | extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class, |
1585 | unsigned long deadline); | 1599 | unsigned long deadline); |
1586 | extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes); | 1600 | extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes); |
1601 | extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc); | ||
1587 | extern void ata_sff_error_handler(struct ata_port *ap); | 1602 | extern void ata_sff_error_handler(struct ata_port *ap); |
1588 | extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc); | 1603 | extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc); |
1589 | extern int ata_sff_port_start(struct ata_port *ap); | 1604 | extern int ata_sff_port_start(struct ata_port *ap); |
1605 | extern int ata_sff_port_start32(struct ata_port *ap); | ||
1590 | extern void ata_sff_std_ports(struct ata_ioports *ioaddr); | 1606 | extern void ata_sff_std_ports(struct ata_ioports *ioaddr); |
1591 | extern unsigned long ata_bmdma_mode_filter(struct ata_device *dev, | 1607 | extern unsigned long ata_bmdma_mode_filter(struct ata_device *dev, |
1592 | unsigned long xfer_mask); | 1608 | unsigned long xfer_mask); |