linux/drivers/pci
Roland Dreier 24a4e37706 [PATCH] PCI: add pci_find_next_capability()
Some devices have more than one capability of the same type.  For
example, the PCI header for the PathScale InfiniPath looks like:

	04:01.0 InfiniBand: Unknown device 1fc1:000d (rev 02)
		Subsystem: Unknown device 1fc1:000d
		Flags: bus master, fast devsel, latency 0, IRQ 193
		Memory at fea00000 (64-bit, non-prefetchable) [size=2M]
		Capabilities: [c0] HyperTransport: Slave or Primary Interface
		Capabilities: [f8] HyperTransport: Interrupt Discovery and Configuration

There are _two_ HyperTransport capabilities, and the PathScale driver
wants to look at both of them.

The current pci_find_capability() API doesn't work for this, since it
only allows us to get to the first capability of a given type.  The
patch below introduces a new pci_find_next_capability(), which can be
used in a loop like

	for (pos = pci_find_capability(pdev, <ID>);
	     pos;
	     pos = pci_find_next_capability(pdev, pos, <ID>)) {
		/* ... */
	}

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-10 16:09:14 -08:00
..
hotplug [PATCH] ppc64: bugfix: crash on PHB add 2005-11-10 16:02:35 +11:00
pcie [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
.gitignore Add some basic .gitignore files 2005-10-18 08:26:15 -07:00
access.c [PATCH] PCI: Block config access during BIST 2005-10-28 15:36:58 -07:00
bus.c [PATCH] PCI: Add pci_walk_bus function to PCI core (nonrecursive) 2005-09-08 15:04:30 -07:00
hotplug.c [PATCH] PCI: remove unused "scratch" 2005-09-22 07:58:24 -07:00
Kconfig [PATCH] PCI: remove CONFIG_PCI_NAMES 2005-09-08 14:57:23 -07:00
Makefile [PATCH] Make sparc64 use setup-res.c 2005-09-08 14:57:25 -07:00
msi.c [PATCH] kernel-doc: PCI fixes 2005-10-28 15:37:01 -07:00
msi.h [PATCH] x86/x86_64: deferred handling of writes to /proc/irqxx/smp_affinity 2005-09-07 16:57:15 -07:00
pci-acpi.c [ACPI] gut acpi_pci_choose_state() to avoid conflict 2005-07-11 23:54:14 -04:00
pci-driver.c [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
pci-sysfs.c [PATCH] PCI: Block config access during BIST 2005-10-28 15:36:58 -07:00
pci.c [PATCH] PCI: add pci_find_next_capability() 2005-11-10 16:09:14 -08:00
pci.h [PATCH] PCI: Block config access during BIST 2005-10-28 15:36:58 -07:00
probe.c [PATCH] kernel-doc: PCI fixes 2005-10-28 15:37:01 -07:00
proc.c [PATCH] PCI: Block config access during BIST 2005-10-28 15:36:58 -07:00
quirks.c Fix PIIX4 SMB region size 2005-10-30 14:40:07 -08:00
remove.c [PATCH] acpi bridge hotadd: Make the PCI remove routines safe for failed hot-plug 2005-06-27 21:52:41 -07:00
rom.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
search.c [IA64] hotplug/ia64: SN Hotplug Driver - pci_find_next_bus export 2005-07-06 15:28:40 -07:00
setup-bus.c cardbus: limit IO windows to 256 bytes 2005-10-23 16:31:16 -07:00
setup-irq.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup-res.c [PATCH] Make sparc64 use setup-res.c 2005-09-08 14:57:25 -07:00
syscall.c [PATCH] PCI: Block config access during BIST 2005-10-28 15:36:58 -07:00