Kernel: Enable IRQs before sending commands to the E1000 adapter
This change prevents a race condition, in which case we send a command and we are losing an interrupt.
This commit is contained in:
parent
7c859efa85
commit
893d4a41c2
Notes:
sideshowbarker
2024-07-19 08:09:36 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/893d4a41c2d Pull-request: https://github.com/SerenityOS/serenity/pull/1361 Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 1 deletions
|
@ -377,9 +377,9 @@ void E1000NetworkAdapter::send_raw(const u8* data, size_t length)
|
|||
klog() << "E1000: Using tx descriptor " << tx_current << " (head is at " << in32(REG_TXDESCHEAD) << ")";
|
||||
#endif
|
||||
tx_current = (tx_current + 1) % number_of_tx_descriptors;
|
||||
out32(REG_TXDESCTAIL, tx_current);
|
||||
cli();
|
||||
enable_irq();
|
||||
out32(REG_TXDESCTAIL, tx_current);
|
||||
for (;;) {
|
||||
if (descriptor.status) {
|
||||
sti();
|
||||
|
|
Loading…
Add table
Reference in a new issue