Commit 19110cf
e1000e: Separate signaling for link check/link up
Lennart reported the following race condition:
\ e1000_watchdog_task
\ e1000e_has_link
\ hw->mac.ops.check_for_link() === e1000e_check_for_copper_link
/* link is up */
mac->get_link_status = false;
/* interrupt */
\ e1000_msix_other
hw->mac.get_link_status = true;
link_active = !hw->mac.get_link_status
/* link_active is false, wrongly */
This problem arises because the single flag get_link_status is used to
signal two different states: link status needs checking and link status is
down.
Avoid the problem by using the return value of .check_for_link to signal
the link status to e1000e_has_link().
Reported-by: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>1 parent d3509f8 commit 19110cf
2 files changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
413 | 416 | | |
414 | 417 | | |
415 | 418 | | |
| |||
423 | 426 | | |
424 | 427 | | |
425 | 428 | | |
426 | | - | |
| 429 | + | |
427 | 430 | | |
428 | 431 | | |
429 | 432 | | |
| |||
461 | 464 | | |
462 | 465 | | |
463 | 466 | | |
464 | | - | |
| 467 | + | |
465 | 468 | | |
| 469 | + | |
| 470 | + | |
466 | 471 | | |
467 | | - | |
| 472 | + | |
468 | 473 | | |
469 | 474 | | |
470 | 475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5081 | 5081 | | |
5082 | 5082 | | |
5083 | 5083 | | |
5084 | | - | |
| 5084 | + | |
5085 | 5085 | | |
5086 | 5086 | | |
5087 | 5087 | | |
| |||
0 commit comments