summaryrefslogtreecommitdiff
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2005-10-04 08:09:19 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-04 08:09:19 -0400
commit47a8659380d40d5c0786ddb62a89b3f7f1392430 (patch)
tree696e7f9874e6087e6aaec51fbe1d4a91cd3dfc64 /include/linux/libata.h
parentfe998aa7e27f125f6768ec6b137b0ce2c9790509 (diff)
libata: bitmask based pci init functions for one or two ports
This redoes the n_ports logic I proposed before as a bitmask. ata_pci_init_native_mode is now used with a mask allowing for mixed mode stuff later on. ata_pci_init_legacy_port is called with port number and does one port now not two. Instead it is called twice by the ata init logic which cleans both of them up. There are stil limits in the original code left over - IRQ/port mapping for legacy mode should be arch specific values - You can have one legacy mode IDE adapter per PCI root bridge on some systems - Doesn't handle mixed mode devices yet (but is now a lot closer to it)
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 4739a75b983d..4d45179872cc 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -155,6 +155,10 @@ enum {
ATA_SHIFT_UDMA = 0,
ATA_SHIFT_MWDMA = 8,
ATA_SHIFT_PIO = 11,
+
+ /* Masks for port functions */
+ ATA_PORT_PRIMARY = (1 << 0),
+ ATA_PORT_SECONDARY = (1 << 1),
};
enum hsm_task_states {
@@ -458,7 +462,7 @@ struct pci_bits {
extern void ata_pci_host_stop (struct ata_host_set *host_set);
extern struct ata_probe_ent *
-ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port);
+ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask);
extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits);
#endif /* CONFIG_PCI */