aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
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
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')
-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 {
155 ATA_SHIFT_UDMA = 0, 155 ATA_SHIFT_UDMA = 0,
156 ATA_SHIFT_MWDMA = 8, 156 ATA_SHIFT_MWDMA = 8,
157 ATA_SHIFT_PIO = 11, 157 ATA_SHIFT_PIO = 11,
158
159 /* Masks for port functions */
160 ATA_PORT_PRIMARY = (1 << 0),
161 ATA_PORT_SECONDARY = (1 << 1),
158}; 162};
159 163
160enum hsm_task_states { 164enum hsm_task_states {
@@ -458,7 +462,7 @@ struct pci_bits {
458 462
459extern void ata_pci_host_stop (struct ata_host_set *host_set); 463extern void ata_pci_host_stop (struct ata_host_set *host_set);
460extern struct ata_probe_ent * 464extern struct ata_probe_ent *
461ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port); 465ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask);
462extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits); 466extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits);
463 467
464#endif /* CONFIG_PCI */ 468#endif /* CONFIG_PCI */