aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-09-23 00:19:54 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-12 14:55:44 -0400
commit3af9a77af9e2b72366363864bfcd3d51465ff98a (patch)
treef6a311a56353cf81d34d64cf1a3f86aa6f659246 /include/linux/libata.h
parent3495de733633d24ee97852080b737b436c110d6e (diff)
libata-pmp: implement Port Multiplier support
Implement Port Multiplier support. To support PMP, a LLDD has to supply ops->pmp_read() and pmp_write(). If non-null, ->pmp_attach and ->pmp_detach are called on PMP attach and detach, respectively. ->pmp_read/write() can be called while the port is frozen, so they must be implemented by polling. This patch supplies several helpers to ease ->pmp_read/write() implementation. Also, irq_handler and error_handler must be PMP aware. Most of PMP aware EH can be done by calling ata_pmp_do_eh() with appropriate methods. PMP EH uses separate set of reset methods and this patch implements standard prereset, hardreset and postreset methods. This patch only implements PMP support. The next patch will integrate PMP into the reset of libata and thus enable PMP support. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index f9ed198e4fcd..3cfdb5f67621 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -945,6 +945,25 @@ extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long);
945#endif /* CONFIG_PCI */ 945#endif /* CONFIG_PCI */
946 946
947/* 947/*
948 * PMP
949 */
950extern void sata_pmp_read_init_tf(struct ata_taskfile *tf,
951 struct ata_device *dev, int pmp, int reg);
952extern u32 sata_pmp_read_val(const struct ata_taskfile *tf);
953extern void sata_pmp_write_init_tf(struct ata_taskfile *tf,
954 struct ata_device *dev,
955 int pmp, int reg, u32 val);
956extern int sata_pmp_std_prereset(struct ata_link *link, unsigned long deadline);
957extern int sata_pmp_std_hardreset(struct ata_link *link, unsigned int *class,
958 unsigned long deadline);
959extern void sata_pmp_std_postreset(struct ata_link *link, unsigned int *class);
960extern void sata_pmp_do_eh(struct ata_port *ap,
961 ata_prereset_fn_t prereset, ata_reset_fn_t softreset,
962 ata_reset_fn_t hardreset, ata_postreset_fn_t postreset,
963 ata_prereset_fn_t pmp_prereset, ata_reset_fn_t pmp_softreset,
964 ata_reset_fn_t pmp_hardreset, ata_postreset_fn_t pmp_postreset);
965
966/*
948 * EH 967 * EH
949 */ 968 */
950extern void ata_eng_timeout(struct ata_port *ap); 969extern void ata_eng_timeout(struct ata_port *ap);