summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorart <art@openbsd.org>2002-08-28 11:05:02 +0000
committerart <art@openbsd.org>2002-08-28 11:05:02 +0000
commitd1c36586dfc3889b252bf8022826be5268b6991f (patch)
treed4e1a67c12ea8b0254128f71bc91452d004ef032
parentRAIDframe spelling. ok art@ (diff)
downloadwireguard-openbsd-d1c36586dfc3889b252bf8022826be5268b6991f.tar.xz
wireguard-openbsd-d1c36586dfc3889b252bf8022826be5268b6991f.zip
- Fix one typo (instead of two disable_rx, one disable_rx and one disable_tx)
- Instead of setting OACTIVE on the interface when encap fails and never clearing it, set a 2 second timer instead and hope that the memory situation will improve. This stops the lockups of the interface when memory is running low. jason@ ok.
-rw-r--r--sys/dev/ic/gem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c
index 6300b5dafa2..81170a79f42 100644
--- a/sys/dev/ic/gem.c
+++ b/sys/dev/ic/gem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gem.c,v 1.26 2002/07/10 18:08:13 deraadt Exp $ */
+/* $OpenBSD: gem.c,v 1.27 2002/08/28 11:05:02 art Exp $ */
/* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */
/*
@@ -448,7 +448,7 @@ gem_stop(struct ifnet *ifp, int disable)
/* XXX - Should we reset these instead? */
gem_disable_rx(sc);
- gem_disable_rx(sc);
+ gem_disable_tx(sc);
/*
* Release any queued transmit buffers.
@@ -1693,7 +1693,7 @@ gem_start(ifp)
* or fail...
*/
if (gem_encap(sc, m, &bix)) {
- ifp->if_flags |= IFF_OACTIVE;
+ ifp->if_timer = 2;
break;
}