aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-01-24 03:05:22 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-27 20:58:34 -0500
commita62c0fc526c344d8163f7a9e45e68cc63826ffd3 (patch)
treed803a14848eb785f63b5f9e2d0b3f19afa0bda9d /include/linux/libata.h
parentc19ba8af4f104cca28d548cac55c128b28dd31fb (diff)
[PATCH] libata: implement ata_drive_probe_reset()
Most low level drivers share supported reset/classify actions and sequence. This patch implements ata_drive_probe_reset() which helps constructing ->probe_reset from three component operations - softreset, hardreset and postreset. This minimizes duplicate code and yet allows flexibility if needed. The three component operations can also be shared by EH later. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index a84d1c3a5429..38e08ce2d1af 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -241,6 +241,8 @@ struct ata_queued_cmd;
241 241
242/* typedefs */ 242/* typedefs */
243typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); 243typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc);
244typedef int (*ata_reset_fn_t)(struct ata_port *, int, unsigned int *);
245typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *);
244 246
245struct ata_ioports { 247struct ata_ioports {
246 unsigned long cmd_addr; 248 unsigned long cmd_addr;
@@ -478,6 +480,9 @@ extern void ata_port_probe(struct ata_port *);
478extern void __sata_phy_reset(struct ata_port *ap); 480extern void __sata_phy_reset(struct ata_port *ap);
479extern void sata_phy_reset(struct ata_port *ap); 481extern void sata_phy_reset(struct ata_port *ap);
480extern void ata_bus_reset(struct ata_port *ap); 482extern void ata_bus_reset(struct ata_port *ap);
483extern int ata_drive_probe_reset(struct ata_port *ap,
484 ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
485 ata_postreset_fn_t postreset, unsigned int *classes);
481extern void ata_port_disable(struct ata_port *); 486extern void ata_port_disable(struct ata_port *);
482extern void ata_std_ports(struct ata_ioports *ioaddr); 487extern void ata_std_ports(struct ata_ioports *ioaddr);
483#ifdef CONFIG_PCI 488#ifdef CONFIG_PCI