]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r283923
authorsbruno <sbruno@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 16 Jun 2015 12:10:55 +0000 (12:10 +0000)
committersbruno <sbruno@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 16 Jun 2015 12:10:55 +0000 (12:10 +0000)
commit3b6bf692f279aeff7bf363fb4fb138598dd24565
tree118cad249886a8e61e1e75569f74ae608feff851
parentd3a120927e2775804449843e0bb1056faf403bf6
MFC r283923

Simplify hang detection by stealing the techniques used in ixl(4) and
applying them to em(4).

Rely on iterations through the local timer, and the tx queue state to
determine if an actual hang has occurred. Any time a descriptor is used
(packet sent), the tx queue is flagged as busy. Then when txeof runs, it
either clears the flag when all is clean, or resets it to 1 if ANY are
cleaned, if nothing is cleaned it increments the flag.

Local timer simply checks to see if busy ever reaches MAX (10, which
is compile time configurable), and then sets it as HUNG, at that point
there is one more timer cycle in which to have any cleans, if not a
watchdog reset will occur.

git-svn-id: svn://svn.freebsd.org/base/stable/10@284444 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/e1000/if_em.c
sys/dev/e1000/if_em.h