summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_ti.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-04-29 16:27:51 +0000
committerwpaul <wpaul@FreeBSD.org>1999-04-29 16:27:51 +0000
commit7d47725500cdad61cb85ec5b9274d772e56159e6 (patch)
tree69961fa2a5f6ad7cad0b70f0ed530b94ca02fd4b /sys/pci/if_ti.c
parentddb28a558c400ea61fe8f37c1b0216e567949406 (diff)
downloadFreeBSD-src-7d47725500cdad61cb85ec5b9274d772e56159e6.zip
FreeBSD-src-7d47725500cdad61cb85ec5b9274d772e56159e6.tar.gz
Add a test to ti_encap() to try and prevent the transmit producer index
from ever catching up to the transmit consumer index. We can't let this happen because ti_txeof() depends on the assumption that producer == consumer means the ring is empty, and producer != consumer means the ring has some number of active descriptors in it.
Diffstat (limited to 'sys/pci/if_ti.c')
-rw-r--r--sys/pci/if_ti.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c
index 297cbc0..212f345 100644
--- a/sys/pci/if_ti.c
+++ b/sys/pci/if_ti.c
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_ti.c,v 1.2 1999/04/06 22:56:21 wpaul Exp $
+ * $Id: if_ti.c,v 1.109 1999/04/29 16:22:07 wpaul Exp $
*/
/*
@@ -128,7 +128,7 @@
#if !defined(lint)
static const char rcsid[] =
- "$Id: if_ti.c,v 1.2 1999/04/06 22:56:21 wpaul Exp $";
+ "$Id: if_ti.c,v 1.109 1999/04/29 16:22:07 wpaul Exp $";
#endif
/*
@@ -2053,6 +2053,9 @@ static int ti_encap(sc, m_head, txidx)
if (m != NULL)
return(ENOBUFS);
+ if (frag == sc->ti_tx_saved_considx)
+ return(ENOBUFS);
+
if (sc->ti_hwrev == TI_HWREV_TIGON)
sc->ti_rdata->ti_tx_ring_nic[cur % 128].ti_flags |=
TI_BDFLAG_END;
OpenPOWER on IntegriCloud