Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel: Make sure the E1000 network adapter keeps receiving packets #6669

Merged
merged 5 commits into from
Apr 27, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Kernel: Add logging for E1000 RX buffer overrun
  • Loading branch information
gunnarbeutner committed Apr 27, 2021
commit 2376288787681935f19b79170d79aa0b4e3b329d
5 changes: 4 additions & 1 deletion Kernel/Net/E1000NetworkAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ UNMAP_AFTER_INIT E1000NetworkAdapter::E1000NetworkAdapter(PCI::Address address,
initialize_tx_descriptors();

out32(REG_INTERRUPT_MASK_SET, 0x1f6dc);
out32(REG_INTERRUPT_MASK_SET, INTERRUPT_LSC | INTERRUPT_RXT0);
out32(REG_INTERRUPT_MASK_SET, INTERRUPT_LSC | INTERRUPT_RXT0 | INTERRUPT_RXO);
in32(REG_INTERRUPT_CAUSE_READ);

enable_irq();
Expand All @@ -232,6 +232,9 @@ void E1000NetworkAdapter::handle_irq(const RegisterState&)
if (status & INTERRUPT_RXDMT0) {
// Threshold OK?
}
if (status & INTERRUPT_RXO) {
dbgln_if(E1000_DEBUG, "E1000: RX buffer overrun");
}
if (status & INTERRUPT_RXT0) {
receive();
}
Expand Down