jme: Don't immediately recycle the TX descriptor even if it is owned by us.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 19 Aug 2012 07:56:21 +0000 (15:56 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 19 Aug 2012 07:56:21 +0000 (15:56 +0800)
commit6960d7d2cb2681b37c16366f3641e2b6a1ea5188
tree7b9938b97568efaa1b9c8bd9806dcab91a71bf46
parentbe55a6671c8445a5275e553214bffd4c0bf5f58e
jme: Don't immediately recycle the TX descriptor even if it is owned by us.

This chip will always update the TX descriptor's 32bits fields in order,
so even if the status field has been updated, i.e. OWN is cleared, it still
does not mean that the buflen field has been updated.  To avoid this race
we don't immediately recycle the currently checking TX descriptor.  Instead,
next TX descriptor's OWN bit is checked, if it is cleared, then the updating
of the currently checked TX descrptor is really done.

This is intended to fix the seldom watchdog timeout that was observed on this
chip.

Thank devinchiu@jmicron.com very much for providing necessary information.
sys/dev/netif/jme/if_jme.c
sys/dev/netif/jme/if_jmevar.h