Skip to content

Commit

Permalink
Kernel: Set initial link up status for RTL8139
Browse files Browse the repository at this point in the history
On startup the link was assumed to be down, making the adapter not work
until the link up status was cycled.
  • Loading branch information
twvd authored and gunnarbeutner committed Aug 3, 2021
1 parent df6db8b commit 1f07882
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Kernel/Net/RTL8139NetworkAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1f07882

Please sign in to comment.