1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:07:43 +00:00

Kernel: Keep records of PCI::Address & PCI::ID pairs for enumeration

This commit is contained in:
Liav A 2020-04-10 20:25:03 +03:00 committed by Andreas Kling
parent 688dd9ea66
commit 65f939b55c
12 changed files with 49 additions and 13 deletions

View file

@ -118,7 +118,7 @@ static Lock& s_lock()
OwnPtr<PATAChannel> PATAChannel::create(ChannelType type, bool force_pio)
{
PCI::Address pci_address;
PCI::enumerate_all([&](const PCI::Address& address, PCI::ID id) {
PCI::enumerate([&](const PCI::Address& address, PCI::ID id) {
if (PCI::get_class(address) == PCI_Mass_Storage_Class && PCI::get_subclass(address) == PCI_IDE_Controller_Subclass) {
pci_address = address;
klog() << "PATAChannel: PATA Controller found, ID " << id;