diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-14 13:02:40 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-14 13:02:40 +0100 |
commit | 9d67a6ba342bb156a8362593ed90c25aa3134cf1 (patch) | |
tree | f56d29a27f40c0c67d0c65222df5f5d7a0be6982 | |
parent | 7d0583a33f4e6730ebdf331d035eab199b3e254f (diff) | |
download | serenity-9d67a6ba342bb156a8362593ed90c25aa3134cf1.zip |
E1000: Disable interrupts while getting ready to wait on TX completion
-rw-r--r-- | Kernel/Net/E1000NetworkAdapter.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Kernel/Net/E1000NetworkAdapter.cpp b/Kernel/Net/E1000NetworkAdapter.cpp index 3a93b30182..ff9ee3f538 100644 --- a/Kernel/Net/E1000NetworkAdapter.cpp +++ b/Kernel/Net/E1000NetworkAdapter.cpp @@ -340,10 +340,13 @@ void E1000NetworkAdapter::send_raw(const u8* data, int length) #endif tx_current = (tx_current + 1) % number_of_tx_descriptors; out32(REG_TXDESCTAIL, tx_current); + cli(); enable_irq(); for (;;) { - if (descriptor.status) + if (descriptor.status) { + sti(); break; + } current->wait_on(m_wait_queue); } #ifdef E1000_DEBUG |