summaryrefslogtreecommitdiff
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-10-09 15:06:48 +0900
committerJeff Garzik <jeff@garzik.org>2007-10-12 14:55:47 -0400
commitb06ce3e51e3df4394a584c234f11240b1c6f8d5b (patch)
tree6a6f5a1cccdc2972b236d376afeba4fd296d5400 /include/linux/libata.h
parentafaa5c373d2c49ee4865847031b82f1377f609d0 (diff)
libata: use ata_exec_internal() for PMP register access
PMP registers used to be accessed with dedicated accessors ->pmp_read and ->pmp_write. During reset, those callbacks are called with the port frozen so they should be able to run without depending on interrupt delivery. To achieve this, they were implemented polling. However, as resetting the host port makes the PMP to isolate fan-out ports until SError.X is cleared, resetting fan-out ports while port is frozen doesn't buy much additional safety. This patch updates libata PMP support such that PMP registers are accessed using regular ata_exec_internal() mechanism and kills ->pmp_read/write() callbacks. The following changes are made. * PMP access helpers - sata_pmp_read_init_tf(), sata_pmp_read_val(), sata_pmp_write_init_tf() are folded into sata_pmp_read/write() which are now standalone PMP register access functions. * sata_pmp_read/write() returns err_mask instead of rc. This is consistent with other functions which issue internal commands and allows more detailed error reporting. * ahci interrupt handler is modified to ignore BAD_PMP and spurious/illegal completion IRQs while reset is in progress. These conditions are expected during reset. 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.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 529af9fbed53..2439f1fa47a1 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -669,8 +669,6 @@ struct ata_port_operations {
/* port multiplier */
void (*pmp_attach) (struct ata_port *ap);
void (*pmp_detach) (struct ata_port *ap);
- int (*pmp_read) (struct ata_device *dev, int pmp, int reg, u32 *r_val);
- int (*pmp_write) (struct ata_device *dev, int pmp, int reg, u32 val);
/* Error handlers. ->error_handler overrides ->eng_timeout and
* indicates that new-style EH is in place.
@@ -957,12 +955,6 @@ extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long);
* PMP
*/
extern int sata_pmp_qc_defer_cmd_switch(struct ata_queued_cmd *qc);
-extern void sata_pmp_read_init_tf(struct ata_taskfile *tf,
- struct ata_device *dev, int pmp, int reg);
-extern u32 sata_pmp_read_val(const struct ata_taskfile *tf);
-extern void sata_pmp_write_init_tf(struct ata_taskfile *tf,
- struct ata_device *dev,
- int pmp, int reg, u32 val);
extern int sata_pmp_std_prereset(struct ata_link *link, unsigned long deadline);
extern int sata_pmp_std_hardreset(struct ata_link *link, unsigned int *class,
unsigned long deadline);