summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-01-24 17:05:22 +0900
committerJeff Garzik <jgarzik@pobox.com>2006-01-27 20:58:34 -0500
commita62c0fc526c344d8163f7a9e45e68cc63826ffd3 (patch)
treed803a14848eb785f63b5f9e2d0b3f19afa0bda9d /include/linux
parentc19ba8af4f104cca28d548cac55c128b28dd31fb (diff)
downloadlwn-a62c0fc526c344d8163f7a9e45e68cc63826ffd3.tar.gz
lwn-a62c0fc526c344d8163f7a9e45e68cc63826ffd3.zip
[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')
-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;
/* typedefs */
typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc);
+typedef int (*ata_reset_fn_t)(struct ata_port *, int, unsigned int *);
+typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *);
struct ata_ioports {
unsigned long cmd_addr;
@@ -478,6 +480,9 @@ extern void ata_port_probe(struct ata_port *);
extern void __sata_phy_reset(struct ata_port *ap);
extern void sata_phy_reset(struct ata_port *ap);
extern void ata_bus_reset(struct ata_port *ap);
+extern int ata_drive_probe_reset(struct ata_port *ap,
+ ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
+ ata_postreset_fn_t postreset, unsigned int *classes);
extern void ata_port_disable(struct ata_port *);
extern void ata_std_ports(struct ata_ioports *ioaddr);
#ifdef CONFIG_PCI