We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77b0653 commit 5c5f0cfCopy full SHA for 5c5f0cf
modules/e1000/e1000.c
@@ -373,7 +373,8 @@ bool e1000_start(pci_dev_t *pci_device) {
373
e1000_write_command(REG_CTRL, 0x20 | ECTRL_SLU);
374
375
if (e1000_device_id == E1000_82541PI) {
376
- sleep(10); // Delay required after CTRL write on 82541PI
+ // Delay required after CTRL write on 82541PI
377
+ for (int j = 0; j < 10000; ++j) io_wait();
378
}
379
380
e1000_check_link();
src/timer.c
@@ -43,7 +43,7 @@ void sleep(uint64_t milliseconds)
43
uint64_t start = ticks;
44
uint64_t end = start + milliseconds;
45
while (ticks < end) {
46
- __asm__ volatile("hlt");
+ __asm__ volatile("pause");
47
48
49
0 commit comments