Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/arch/hp300/dev Pull up revision 1.44 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/5ec3a29ae908
branches:  netbsd-1-4
changeset: 471027:5ec3a29ae908
user:      he <he%NetBSD.org@localhost>
date:      Thu Oct 12 21:32:06 2000 +0000

description:
Pull up revision 1.44 (requested by he):
  Add randomness sampling for hil, sd and rd on the hp300 port.

diffstat:

 sys/arch/hp300/dev/rd.c |  21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diffs (61 lines):

diff -r ec60f1567494 -r 5ec3a29ae908 sys/arch/hp300/dev/rd.c
--- a/sys/arch/hp300/dev/rd.c   Thu Oct 12 21:32:02 2000 +0000
+++ b/sys/arch/hp300/dev/rd.c   Thu Oct 12 21:32:06 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rd.c,v 1.36 1998/01/12 18:31:06 thorpej Exp $  */
+/*     $NetBSD: rd.c,v 1.36.8.1 2000/10/12 21:32:06 he 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
@@ -346,6 +351,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
@@ -932,6 +944,9 @@
        }
        if (rdfinish(rs, bp))
                rdustart(rs);
+#if NRND > 0
+       rnd_add_uint32(&rs->rnd_source, bp->b_blkno);
+#endif
 }
 
 int



Home | Main Index | Thread Index | Old Index