mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
Kernel/E1000: Consolidate RX and TX buffer regions
Allocate all the RX buffers in one big memory region (and same for TX.) This removes 38 lines from every crash dump (and just seems like a reasonable idea in general.)
This commit is contained in:
parent
5516ad7158
commit
e49af4bac9
2 changed files with 24 additions and 18 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/NonnullOwnPtrVector.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <Kernel/Bus/PCI/Access.h>
|
||||
#include <Kernel/Bus/PCI/Device.h>
|
||||
|
@ -77,21 +76,23 @@ protected:
|
|||
|
||||
void receive();
|
||||
|
||||
static constexpr size_t number_of_rx_descriptors = 32;
|
||||
static constexpr size_t number_of_tx_descriptors = 8;
|
||||
|
||||
IOAddress m_io_base;
|
||||
VirtualAddress m_mmio_base;
|
||||
OwnPtr<Region> m_rx_descriptors_region;
|
||||
OwnPtr<Region> m_tx_descriptors_region;
|
||||
NonnullOwnPtrVector<Region> m_rx_buffers_regions;
|
||||
NonnullOwnPtrVector<Region> m_tx_buffers_regions;
|
||||
OwnPtr<Region> m_rx_buffer_region;
|
||||
OwnPtr<Region> m_tx_buffer_region;
|
||||
Array<void*, number_of_rx_descriptors> m_rx_buffers;
|
||||
Array<void*, number_of_tx_descriptors> m_tx_buffers;
|
||||
OwnPtr<Region> m_mmio_region;
|
||||
u8 m_interrupt_line { 0 };
|
||||
bool m_has_eeprom { false };
|
||||
bool m_use_mmio { false };
|
||||
EntropySource m_entropy_source;
|
||||
|
||||
static constexpr size_t number_of_rx_descriptors = 32;
|
||||
static constexpr size_t number_of_tx_descriptors = 8;
|
||||
|
||||
WaitQueue m_wait_queue;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue