mirror of
https://github.com/RGBCube/serenity
synced 2025-07-19 20:27:35 +00:00
Kernel/USB: Tighten up USBManagement enumeration code a bit
This commit is contained in:
parent
1479ee3f3e
commit
d16d116b65
1 changed files with 27 additions and 26 deletions
|
@ -22,9 +22,12 @@ UNMAP_AFTER_INIT USBManagement::USBManagement()
|
|||
|
||||
UNMAP_AFTER_INIT void USBManagement::enumerate_controllers()
|
||||
{
|
||||
if (!kernel_command_line().disable_usb()) {
|
||||
if (kernel_command_line().disable_usb())
|
||||
return;
|
||||
|
||||
PCI::enumerate([this](PCI::Address const& address, PCI::ID) {
|
||||
if (PCI::get_class(address) == 0xc && PCI::get_subclass(address) == 0x3) {
|
||||
if (!(PCI::get_class(address) == 0xc && PCI::get_subclass(address) == 0x3))
|
||||
return;
|
||||
if (PCI::get_programming_interface(address) == 0x0) {
|
||||
if (kernel_command_line().disable_uhci_controller())
|
||||
return;
|
||||
|
@ -51,9 +54,7 @@ UNMAP_AFTER_INIT void USBManagement::enumerate_controllers()
|
|||
}
|
||||
|
||||
dmesgln("USBManagement: Unknown/unsupported controller at {} with programming interface 0x{:02x}", address, PCI::get_programming_interface(address));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
bool USBManagement::initialized()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue