Bug 87418 - [em] [patch] The em driver sometimes stop receive data
Summary: [em] [patch] The em driver sometimes stop receive data
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 5.4-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Gleb Smirnoff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-14 01:40 UTC by Dmitrij Tejblum
Modified: 2006-01-11 10:32 UTC (History)
0 users

See Also:


Attachments
file.diff (3.45 KB, patch)
2005-10-14 01:40 UTC, Dmitrij Tejblum
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitrij Tejblum 2005-10-14 01:40:15 UTC
The receive function em_process_receive_interrupts() unlock the adapter
while ether_input() process the packet, and then lock it back. In the 
meantime, em_init() may be called (either from em_watchdog() from softclock
interrupt or from the ifconfig program). em_init() reset the card, in
particular it set adapter->next_rx_desc_to_check to 0 and reset hardware 
RX Head and Tail descriptor pointers. The loop in
em_process_receive_interrupts() does not expect these things to change, and
a mess may result.

Fix: The following patch tries to make em_process_receive_interrupts() fully
reenterant (1.73 was incomplete) and fix the described problem.

(I removed a code for FreeBSD 4: I don't want to deal with it and BTW Intel
themselves ships different drivers for RELENG_4, RELENG_5 and RELENG_6.)
Comment 1 Gleb Smirnoff freebsd_committer freebsd_triage 2005-10-14 11:53:17 UTC
State Changed
From-To: open->patched

Committed, thanks! 


Comment 2 Gleb Smirnoff freebsd_committer freebsd_triage 2005-10-14 11:53:17 UTC
Responsible Changed
From-To: freebsd-bugs->glebius

I am handling this.
Comment 3 Gleb Smirnoff freebsd_committer freebsd_triage 2006-01-11 10:32:08 UTC
State Changed
From-To: patched->closed

Merged to RELENG_5.