aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2009-03-24 06:23:19 -0400
committerJeff Garzik <jgarzik@redhat.com>2009-03-24 22:48:26 -0400
commit3d47aa8e7e7b2aa09256590388aa8dddc79280f9 (patch)
tree82f4c85842e5e02489eb0533609dabb865e55198 /include/linux/libata.h
parentc0f2ee34a5a0b79fd98d965ad8ae765d4639bfa5 (diff)
[libata] Drain data on errors
If the device is signalling that there is data to drain after an error we should read the bytes out and throw them away. Without this some devices and controllers get wedged and don't recover. Based on earlier work by Mark Lord Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 19af7d22a7f8..3a07a32dfc2e 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -836,6 +836,8 @@ struct ata_port_operations {
836 void (*bmdma_start)(struct ata_queued_cmd *qc); 836 void (*bmdma_start)(struct ata_queued_cmd *qc);
837 void (*bmdma_stop)(struct ata_queued_cmd *qc); 837 void (*bmdma_stop)(struct ata_queued_cmd *qc);
838 u8 (*bmdma_status)(struct ata_port *ap); 838 u8 (*bmdma_status)(struct ata_port *ap);
839
840 void (*drain_fifo)(struct ata_queued_cmd *qc);
839#endif /* CONFIG_ATA_SFF */ 841#endif /* CONFIG_ATA_SFF */
840 842
841 ssize_t (*em_show)(struct ata_port *ap, char *buf); 843 ssize_t (*em_show)(struct ata_port *ap, char *buf);
@@ -1587,6 +1589,7 @@ extern int ata_sff_softreset(struct ata_link *link, unsigned int *classes,
1587extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class, 1589extern int sata_sff_hardreset(struct ata_link *link, unsigned int *class,
1588 unsigned long deadline); 1590 unsigned long deadline);
1589extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes); 1591extern void ata_sff_postreset(struct ata_link *link, unsigned int *classes);
1592extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc);
1590extern void ata_sff_error_handler(struct ata_port *ap); 1593extern void ata_sff_error_handler(struct ata_port *ap);
1591extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc); 1594extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc);
1592extern int ata_sff_port_start(struct ata_port *ap); 1595extern int ata_sff_port_start(struct ata_port *ap);