Subject: CVS commit: src/sys/dev/pci
To: None <source-changes@NetBSD.org>
From: Izumi Tsutsui <tsutsui@netbsd.org>
List: source-changes
Date: 11/01/2006 18:11:18
Module Name:	src
Committed By:	tsutsui
Date:		Wed Nov  1 18:11:18 UTC 2006

Modified Files:
	src/sys/dev/pci: if_vge.c

Log Message:
Fix another botch in rev 1.14:
vge_encap() should bail out if there is not enough free
TX descriptor _OR_ TX descriptor is still owned by the chip.

Anyway, we already check if the TX descriptor already has an mbuf
to be sent in vge_start() so no need to bother to check sc_tx_free
and VGE_TDSTS_OWN in the descriptor in normal case, then make it use
KASSERT(9) or wrap with #ifdef DIAGNOSTIC.

XXX1: I don't know why original FreeBSD driver checks
      if a number of free TX descriptors is more than two, not zero.
XXX2: Is it better to check a number of free descriptors in vge_start()
      like other our drivers rather than mbuf chain for each descriptor?


To generate a diff of this commit:
cvs rdiff -r1.23 -r1.24 src/sys/dev/pci/if_vge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.