1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

Kernel: Set initial link up status for RTL8139

On startup the link was assumed to be down, making the adapter not work
until the link up status was cycled.
This commit is contained in:
Thomas Wagenveld 2021-07-31 19:45:42 +02:00 committed by Gunnar Beutner
parent df6db8b8cc
commit 1f078827c4

View file

@ -260,6 +260,9 @@ void RTL8139NetworkAdapter::reset()
// choose irqs, then clear any pending
out16(REG_IMR, INT_RXOK | INT_RXERR | INT_TXOK | INT_TXERR | INT_RX_BUFFER_OVERFLOW | INT_LINK_CHANGE | INT_RX_FIFO_OVERFLOW | INT_LENGTH_CHANGE | INT_SYSTEM_ERROR);
out16(REG_ISR, 0xffff);
// Set the initial link up status.
m_link_up = (in8(REG_MSR) & MSR_LINKB) == 0;
}
UNMAP_AFTER_INIT void RTL8139NetworkAdapter::read_mac_address()