diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2008-12-04 19:39:10 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2008-12-04 19:39:10 -0500 |
commit | 4132e0213ea9b168dd619ca76f1f1bf075d1f4a4 (patch) | |
tree | 3ee2afa254ea118a40b68e0978ee4ff05a091083 /src/pci.h | |
parent | 53ab0b600cc7cd14403a9d8feafb1bd1a81e56eb (diff) | |
download | seabios-4132e0213ea9b168dd619ca76f1f1bf075d1f4a4.tar.gz |
Don't allow start_bdf with new auto max bus detection code.
It's not valid to set a "start bdf" when search for a device now,
because we wont be able to properly detect the maximum bus unless
we start at the beginning.
Change callers that need to resume a search to use foreachpci() macro.
Update all callers so that they don't pass in the now unused start_bdf.
Diffstat (limited to 'src/pci.h')
-rw-r--r-- | src/pci.h | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -23,14 +23,13 @@ u32 pci_config_readl(u16 bdf, u32 addr); u16 pci_config_readw(u16 bdf, u32 addr); u8 pci_config_readb(u16 bdf, u32 addr); -int pci_find_device(u16 vendid, u16 devid, int start_bdf); -int pci_find_classprog(u32 classprog, int start_bdf); -int pci_find_class(u16 classid, int start_bdf); +int pci_find_device(u16 vendid, u16 devid); +int pci_find_class(u16 classid); int pci_next(int bdf, int *pmax); -#define foreachpci(BDF, MAX, START) \ - for (MAX=0x0100, BDF=pci_next((START), &MAX) \ - ; BDF >= 0 \ +#define foreachpci(BDF, MAX) \ + for (MAX=0x0100, BDF=pci_next(0, &MAX) \ + ; BDF >= 0 \ ; BDF=pci_next(BDF+1, &MAX)) // pirtable.c |