mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 12:32:21 +00:00
Kernel: Reorder VirtIODevice PCI initialization steps
We can't reset the device before we've read the PCI configuration space, because we read the reset register location from the configuration space.
This commit is contained in:
parent
7cf34b5549
commit
cbc845c8a8
Notes:
sideshowbarker
2024-07-18 18:04:38 +09:00
Author: https://github.com/ccapitalK
Commit: cbc845c8a8
Pull-request: https://github.com/SerenityOS/serenity/pull/7122
1 changed files with 3 additions and 3 deletions
|
@ -48,9 +48,6 @@ VirtIODevice::VirtIODevice(PCI::Address address, String class_name)
|
|||
PCI::enable_interrupt_line(pci_address());
|
||||
enable_irq();
|
||||
|
||||
reset_device();
|
||||
set_status_bit(DEVICE_STATUS_ACKNOWLEDGE);
|
||||
|
||||
auto capabilities = PCI::get_physical_id(address).capabilities();
|
||||
for (auto& capability : capabilities) {
|
||||
if (capability.id() == PCI_CAPABILITY_VENDOR_SPECIFIC) {
|
||||
|
@ -90,6 +87,9 @@ VirtIODevice::VirtIODevice(PCI::Address address, String class_name)
|
|||
m_isr_cfg = get_config(ConfigurationType::ISR, 0);
|
||||
}
|
||||
|
||||
reset_device();
|
||||
set_status_bit(DEVICE_STATUS_ACKNOWLEDGE);
|
||||
|
||||
set_status_bit(DEVICE_STATUS_DRIVER);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue