Module Name: src
Committed By: bouyer
Date: Wed May 13 19:39:09 UTC 2009
Modified Files:
src/sys/arch/xen/xen [netbsd-3]: if_xennet_xenbus.c
Log Message:
Pull up following revision(s) (requested by jym in ticket #2013):
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.35
Do not forget to detach rnd(4) device when removing a xennet device.
Ok by bouyer@ in private mail.
To generate a diff of this commit:
cvs rdiff -u -r1.7.2.6 -r1.7.2.7 src/sys/arch/xen/xen/if_xennet_xenbus.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/xen/xen/if_xennet_xenbus.c
diff -u src/sys/arch/xen/xen/if_xennet_xenbus.c:1.7.2.6 src/sys/arch/xen/xen/if_xennet_xenbus.c:1.7.2.7
--- src/sys/arch/xen/xen/if_xennet_xenbus.c:1.7.2.6 Fri Mar 20 14:55:32 2009
+++ src/sys/arch/xen/xen/if_xennet_xenbus.c Wed May 13 19:39:08 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: if_xennet_xenbus.c,v 1.7.2.6 2009/03/20 14:55:32 msaitoh Exp $ */
+/* $NetBSD: if_xennet_xenbus.c,v 1.7.2.7 2009/05/13 19:39:08 bouyer Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.7.2.6 2009/03/20 14:55:32 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.7.2.7 2009/05/13 19:39:08 bouyer Exp $");
#include "opt_xen.h"
#include "opt_nfs_boot.h"
@@ -373,6 +373,12 @@
ether_ifdetach(ifp);
if_detach(ifp);
+
+#if NRND > 0
+ /* Unhook the entropy source. */
+ rnd_detach_source(&sc->sc_rnd_source);
+#endif
+
while (xengnt_status(sc->sc_tx_ring_gntref)) {
tsleep(xennet_xenbus_detach, PRIBIO, "xnet_txref", hz/2);
}