mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:47:35 +00:00
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
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) << ")";
|
klog() << "E1000: Using tx descriptor " << tx_current << " (head is at " << in32(REG_TXDESCHEAD) << ")";
|
||||||
#endif
|
#endif
|
||||||
tx_current = (tx_current + 1) % number_of_tx_descriptors;
|
tx_current = (tx_current + 1) % number_of_tx_descriptors;
|
||||||
out32(REG_TXDESCTAIL, tx_current);
|
|
||||||
cli();
|
cli();
|
||||||
enable_irq();
|
enable_irq();
|
||||||
|
out32(REG_TXDESCTAIL, tx_current);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (descriptor.status) {
|
if (descriptor.status) {
|
||||||
sti();
|
sti();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue