Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/arch/hp300/dev Pullup 1.44 [he]:
details: https://anonhg.NetBSD.org/src/rev/c9183301124b
branches: netbsd-1-5
changeset: 489846:c9183301124b
user: tv <tv%NetBSD.org@localhost>
date: Wed Oct 18 00:10:42 2000 +0000
description:
Pullup 1.44 [he]:
Add randomness sampling from hil, sd and rd devices.
diffstat:
sys/arch/hp300/dev/rd.c | 21 ++++++++++++++++++---
sys/arch/hp300/dev/sd.c | 21 ++++++++++++++++++---
2 files changed, 36 insertions(+), 6 deletions(-)
diffs (121 lines):
diff -r f6c570e3706e -r c9183301124b sys/arch/hp300/dev/rd.c
--- a/sys/arch/hp300/dev/rd.c Wed Oct 18 00:10:28 2000 +0000
+++ b/sys/arch/hp300/dev/rd.c Wed Oct 18 00:10:42 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rd.c,v 1.43 2000/05/27 04:52:28 thorpej Exp $ */
+/* $NetBSD: rd.c,v 1.43.4.1 2000/10/18 00:10:42 tv Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -82,6 +82,9 @@
* CS80/SS80 disk driver
*/
+#include "opt_useleds.h"
+#include "rnd.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf.h>
@@ -94,13 +97,15 @@
#include <sys/proc.h>
#include <sys/stat.h>
+#if NRND > 0
+#include <sys/rnd.h>
+#endif
+
#include <hp300/dev/hpibvar.h>
#include <hp300/dev/rdreg.h>
#include <hp300/dev/rdvar.h>
-#include "opt_useleds.h"
-
#ifdef USELEDS
#include <hp300/hp300/leds.h>
#endif
@@ -350,6 +355,13 @@
if (rddebug & RDB_ERROR)
rderrthresh = 0;
#endif
+#if NRND > 0
+ /*
+ * attach the device into the random source list
+ */
+ rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
+ RND_TYPE_DISK, 0);
+#endif
}
int
@@ -934,6 +946,9 @@
}
if (rdfinish(rs, bp))
rdustart(rs);
+#if NRND > 0
+ rnd_add_uint32(&rs->rnd_source, bp->b_blkno);
+#endif
}
int
diff -r f6c570e3706e -r c9183301124b sys/arch/hp300/dev/sd.c
--- a/sys/arch/hp300/dev/sd.c Wed Oct 18 00:10:28 2000 +0000
+++ b/sys/arch/hp300/dev/sd.c Wed Oct 18 00:10:42 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sd.c,v 1.42.4.1 2000/09/14 06:38:17 scottr Exp $ */
+/* $NetBSD: sd.c,v 1.42.4.2 2000/10/18 00:10:42 tv Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -78,6 +78,9 @@
* SCSI CCS (Command Command Set) disk driver.
*/
+#include "rnd.h"
+#include "opt_useleds.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf.h>
@@ -90,12 +93,14 @@
#include <sys/proc.h>
#include <sys/stat.h>
+#if NRND > 0
+#include <sys/rnd.h>
+#endif
+
#include <hp300/dev/scsireg.h>
#include <hp300/dev/scsivar.h>
#include <hp300/dev/sdvar.h>
-#include "opt_useleds.h"
-
#ifdef USELEDS
#include <hp300/hp300/leds.h>
#endif
@@ -296,6 +301,13 @@
disk_attach(&sc->sc_dkdev);
sc->sc_flags |= SDF_ALIVE;
+#if NRND > 0
+ /*
+ * attach the device into the random source list
+ */
+ rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname,
+ RND_TYPE_DISK, 0);
+#endif
}
void
@@ -1008,6 +1020,9 @@
}
}
sdfinish(sc, bp);
+#if NRND > 0
+ rnd_add_uint32(&sc->rnd_source, bp->b_blkno);
+#endif
}
int
Home |
Main Index |
Thread Index |
Old Index