mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 23:54:57 +00:00
Kernel: Convert PCI Capability struct to class with convenience methods
Based on pull #3236 by tomuta Co-authored-by: Tom <tomut@yahoo.com>
This commit is contained in:
parent
dfb23babbb
commit
172d23deae
3 changed files with 61 additions and 7 deletions
|
@ -37,7 +37,7 @@ DeviceController::DeviceController(Address address)
|
|||
bool DeviceController::is_msi_capable() const
|
||||
{
|
||||
for (auto capability : PCI::get_physical_id(pci_address()).capabilities()) {
|
||||
if (capability.m_id == 0x5)
|
||||
if (capability.id() == PCI_CAPABILITY_MSI)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -45,7 +45,7 @@ bool DeviceController::is_msi_capable() const
|
|||
bool DeviceController::is_msix_capable() const
|
||||
{
|
||||
for (auto capability : PCI::get_physical_id(pci_address()).capabilities()) {
|
||||
if (capability.m_id == 0x11)
|
||||
if (capability.id() == PCI_CAPABILITY_MSIX)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue