Kernel: Reset enumerated buses bitmap before enumerating PCI devices

This allows this method to be used more than once.
This commit is contained in:
Idan Horowitz 2024-04-22 12:25:06 +03:00 committed by Andreas Kling
parent 95aff1cf13
commit f6ae9f8a6d
Notes: sideshowbarker 2024-07-17 02:22:23 +09:00

View file

@ -108,6 +108,7 @@ UNMAP_AFTER_INIT void HostController::enumerate_attached_devices(Function<void(E
{
VERIFY(Access::the().access_lock().is_locked());
VERIFY(Access::the().scan_lock().is_locked());
m_enumerated_buses.fill(false);
// First scan bus 0. Find any device on that bus, and if it's a PCI-to-PCI
// bridge, recursively scan it too.
m_enumerated_buses.set(m_domain.start_bus(), true);