Kernel/Net: E1000 interrupt rate register is 32-bit, not 16-bit

I looked at the spec sheet and noticed that it's 32-bit, not 16-bit.
This fixes E1000 causing an MMIO fault on VirtualBox.

Spec: https://www.intel.com/content/dam/doc/manual/pci-pci-x-family-gbe-controllers-software-dev-manual.pdf
Section 13.4.18
This commit is contained in:
Luke 2020-12-22 06:47:08 +00:00 committed by Andreas Kling
parent 780c64e1f0
commit 0316f0627e
Notes: sideshowbarker 2024-07-19 00:41:21 +09:00

View file

@ -184,9 +184,7 @@ E1000NetworkAdapter::E1000NetworkAdapter(PCI::Address address, u8 irq)
u32 flags = in32(REG_CTRL);
out32(REG_CTRL, flags | ECTRL_SLU);
// FIXME: For some reason, this causes an MMIO fault on VirtualBox.
// Removing it allows the system to boot to desktop, but will be hit by an interrupt storm soon after.
out16(REG_INTERRUPT_RATE, 6000); // Interrupt rate of 1.536 milliseconds
out32(REG_INTERRUPT_RATE, 6000); // Interrupt rate of 1.536 milliseconds
initialize_rx_descriptors();
initialize_tx_descriptors();