summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-12-14 13:02:40 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-14 13:02:40 +0100
commit9d67a6ba342bb156a8362593ed90c25aa3134cf1 (patch)
treef56d29a27f40c0c67d0c65222df5f5d7a0be6982
parent7d0583a33f4e6730ebdf331d035eab199b3e254f (diff)
downloadserenity-9d67a6ba342bb156a8362593ed90c25aa3134cf1.zip
E1000: Disable interrupts while getting ready to wait on TX completion
-rw-r--r--Kernel/Net/E1000NetworkAdapter.cpp5
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