summaryrefslogtreecommitdiff
path: root/Kernel/PCI/Access.h
diff options
context:
space:
mode:
authorJean-Baptiste Boric <jblbeurope@gmail.com>2021-01-31 12:03:23 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-31 19:06:40 +0100
commit06d76a4717b3678808d6e8339c0f18cbd7ddbb70 (patch)
tree7035a65e825bb6517c74dda2a88f2ee2ca157e2d /Kernel/PCI/Access.h
parent34508c0b01fa6a652f7e7eb5fad51823d2ba66d1 (diff)
downloadserenity-06d76a4717b3678808d6e8339c0f18cbd7ddbb70.zip
Kernel: Fix PCI bridge enumeration
The enumeration code is already enumerating all buses, recursively enumerating bridges (which are buses) makes devices on bridges being enumerated multiple times. Also, the PCI code was incorrectly mixing up terminology; let's settle down on bus, device and function because ever since PCIe came along "slots" isn't really a thing anymore.
Diffstat (limited to 'Kernel/PCI/Access.h')
-rw-r--r--Kernel/PCI/Access.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/PCI/Access.h b/Kernel/PCI/Access.h
index 2b53ceaf59..ee42c8a057 100644
--- a/Kernel/PCI/Access.h
+++ b/Kernel/PCI/Access.h
@@ -41,9 +41,9 @@ public:
void enumerate(Function<void(Address, ID)>&) const;
- void enumerate_bus(int type, u8 bus, Function<void(Address, ID)>&);
- void enumerate_functions(int type, u8 bus, u8 slot, u8 function, Function<void(Address, ID)>& callback);
- void enumerate_slot(int type, u8 bus, u8 slot, Function<void(Address, ID)>& callback);
+ void enumerate_bus(int type, u8 bus, Function<void(Address, ID)>&, bool recursive);
+ void enumerate_functions(int type, u8 bus, u8 device, u8 function, Function<void(Address, ID)>& callback, bool recursive);
+ void enumerate_device(int type, u8 bus, u8 device, Function<void(Address, ID)>& callback, bool recursive);
static Access& the();
static bool is_initialized();