aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-03-27 12:58:20 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-29 19:30:28 -0500
commit5444a6f405618706eddbe1605ef8533b1b655764 (patch)
tree9265a1e65563add47a9fe5f1ddae44d6dd0742e3 /include/linux/libata.h
parent692785e798f341c057ff976c35a3d86ad5af8ac6 (diff)
[PATCH] libata: Simplex and other mode filtering logic
Add a field to the host_set called 'flags' (was host_set_flags changed to suit Jeff) Add a simplex_claimed field so we can remember who owns the DMA channel Add a ->mode_filter() hook to allow drivers to filter modes Add docs for mode_filter and set_mode Filter according to simplex state Filter cable in core This provides the needed framework to support all the mode rules found in the PATA world. The simplex filter deals with 'to spec' simplex DMA systems found in older chips. The cable filter avoids duplicating the same rules in each chip driver with PATA. Finally the mode filter is neccessary because drive/chip combinations have errata that forbid certain modes with some drives or types of ATA object. Drive speed setup remains per channel for now and the filters now use the framework Tejun put into place which cleans them up a lot from the older libata-pata patches. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 6a9316cbb70b..0d61357604d5 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -294,6 +294,9 @@ struct ata_host_set {
294 unsigned int n_ports; 294 unsigned int n_ports;
295 void *private_data; 295 void *private_data;
296 const struct ata_port_operations *ops; 296 const struct ata_port_operations *ops;
297 unsigned long flags;
298 int simplex_claimed; /* Keep seperate in case we
299 ever need to do this locked */
297 struct ata_port * ports[0]; 300 struct ata_port * ports[0];
298}; 301};
299 302
@@ -423,6 +426,7 @@ struct ata_port_operations {
423 426
424 void (*set_piomode) (struct ata_port *, struct ata_device *); 427 void (*set_piomode) (struct ata_port *, struct ata_device *);
425 void (*set_dmamode) (struct ata_port *, struct ata_device *); 428 void (*set_dmamode) (struct ata_port *, struct ata_device *);
429 unsigned long (*mode_filter) (const struct ata_port *, struct ata_device *, unsigned long);
426 430
427 void (*tf_load) (struct ata_port *ap, const struct ata_taskfile *tf); 431 void (*tf_load) (struct ata_port *ap, const struct ata_taskfile *tf);
428 void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); 432 void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf);