diff options
author | Tejun Heo <htejun@gmail.com> | 2006-01-24 03:05:22 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-27 20:58:34 -0500 |
commit | a62c0fc526c344d8163f7a9e45e68cc63826ffd3 (patch) | |
tree | d803a14848eb785f63b5f9e2d0b3f19afa0bda9d /include/linux/libata.h | |
parent | c19ba8af4f104cca28d548cac55c128b28dd31fb (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.h | 5 |
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 */ |
243 | typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); | 243 | typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); |
244 | typedef int (*ata_reset_fn_t)(struct ata_port *, int, unsigned int *); | ||
245 | typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *); | ||
244 | 246 | ||
245 | struct ata_ioports { | 247 | struct ata_ioports { |
246 | unsigned long cmd_addr; | 248 | unsigned long cmd_addr; |
@@ -478,6 +480,9 @@ extern void ata_port_probe(struct ata_port *); | |||
478 | extern void __sata_phy_reset(struct ata_port *ap); | 480 | extern void __sata_phy_reset(struct ata_port *ap); |
479 | extern void sata_phy_reset(struct ata_port *ap); | 481 | extern void sata_phy_reset(struct ata_port *ap); |
480 | extern void ata_bus_reset(struct ata_port *ap); | 482 | extern void ata_bus_reset(struct ata_port *ap); |
483 | extern 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); | ||
481 | extern void ata_port_disable(struct ata_port *); | 486 | extern void ata_port_disable(struct ata_port *); |
482 | extern void ata_std_ports(struct ata_ioports *ioaddr); | 487 | extern void ata_std_ports(struct ata_ioports *ioaddr); |
483 | #ifdef CONFIG_PCI | 488 | #ifdef CONFIG_PCI |