summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2013-08-01 17:52:28 +0200
committerMichael Brown2013-08-05 14:51:16 +0200
commit6d910559b3855e3b09f7475a42c67b5bcf39327f (patch)
tree683ae580816e4bb62655bc18608fc70b407be7d9 /src/include
parent[cmdline] Add "inc" command (diff)
downloadipxe-6d910559b3855e3b09f7475a42c67b5bcf39327f.tar.gz
ipxe-6d910559b3855e3b09f7475a42c67b5bcf39327f.tar.xz
ipxe-6d910559b3855e3b09f7475a42c67b5bcf39327f.zip
[pci] Add pci_find_next() to iterate over existent PCI devices
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ipxe/pci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/ipxe/pci.h b/src/include/ipxe/pci.h
index a6ed484f1..692771ebe 100644
--- a/src/include/ipxe/pci.h
+++ b/src/include/ipxe/pci.h
@@ -351,6 +351,7 @@ struct pci_driver {
#define PCI_FUNC( busdevfn ) ( ( (busdevfn) >> 0 ) & 0x07 )
#define PCI_BUSDEVFN( bus, slot, func ) \
( ( (bus) << 8 ) | ( (slot) << 3 ) | ( (func) << 0 ) )
+#define PCI_FIRST_FUNC( busdevfn ) ( (busdevfn) & ~0x07 )
#define PCI_BASE_CLASS( class ) ( (class) >> 16 )
#define PCI_SUB_CLASS( class ) ( ( (class) >> 8 ) & 0xff )
@@ -385,6 +386,7 @@ extern void adjust_pci_device ( struct pci_device *pci );
extern unsigned long pci_bar_start ( struct pci_device *pci,
unsigned int reg );
extern int pci_read_config ( struct pci_device *pci );
+extern int pci_find_next ( struct pci_device *pci, unsigned int busdevfn );
extern int pci_find_driver ( struct pci_device *pci );
extern int pci_probe ( struct pci_device *pci );
extern void pci_remove ( struct pci_device *pci );