summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2001-02-09 04:08:12 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2001-02-09 04:08:12 +0000
commite8ef7a31fb1da037af2f8e00fabe535657cc5087 (patch)
tree890c3bc66d3391532f0be6feb4cae0a0479ba995 /sys
parent6758a4798630f868ddba505e2f694074be0b97a9 (diff)
Handle vr_encap() failure. From FreeBSD.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_vr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c
index c6cb612163e..a1587c12ae3 100644
--- a/sys/dev/pci/if_vr.c
+++ b/sys/dev/pci/if_vr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vr.c,v 1.8 2000/07/02 00:27:23 jason Exp $ */
+/* $OpenBSD: if_vr.c,v 1.9 2001/02/09 04:08:11 aaron Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1592,7 +1592,12 @@ vr_start(ifp)
sc->vr_cdata.vr_tx_free = cur_tx->vr_nextdesc;
/* Pack the data into the descriptor. */
- vr_encap(sc, cur_tx, m_head);
+ if (vr_encap(sc, cur_tx, m_head)) {
+ IF_PREPEND(&ifp->if_snd, m_head);
+ ifp->if_flags |= IFF_OACTIVE;
+ cur_tx = NULL;
+ break;
+ }
if (cur_tx != start_tx)
VR_TXOWN(cur_tx) = VR_TXSTAT_OWN;