mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
Kernel: Keep records of PCI::Address & PCI::ID pairs for enumeration
This commit is contained in:
parent
688dd9ea66
commit
65f939b55c
Notes:
sideshowbarker
2024-07-19 07:44:07 +09:00
Author: https://github.com/supercomputer7
Commit: 65f939b55c
Pull-request: https://github.com/SerenityOS/serenity/pull/1734
Reviewed-by: https://github.com/awesomekling
12 changed files with 49 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue