diff options
author | Thomas Wagenveld <thomas@thomasw.dev> | 2021-07-31 19:45:42 +0200 |
---|---|---|
committer | Gunnar Beutner <gunnar@beutner.name> | 2021-08-03 10:20:51 +0200 |
commit | 1f078827c4a3f5b2edb7c6a3c0af04eba71cbeb0 (patch) | |
tree | 93c3b224bb6d69ead124ee87017572ea0eb773a1 /Kernel/Net/RTL8139NetworkAdapter.cpp | |
parent | df6db8b8cce06842ce720c2ce2fe087b1d92dd5f (diff) | |
download | serenity-1f078827c4a3f5b2edb7c6a3c0af04eba71cbeb0.zip |
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.
Diffstat (limited to 'Kernel/Net/RTL8139NetworkAdapter.cpp')
-rw-r--r-- | Kernel/Net/RTL8139NetworkAdapter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/Net/RTL8139NetworkAdapter.cpp b/Kernel/Net/RTL8139NetworkAdapter.cpp index 6348651333..be85fdf511 100644 --- a/Kernel/Net/RTL8139NetworkAdapter.cpp +++ b/Kernel/Net/RTL8139NetworkAdapter.cpp @@ -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() |