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/ef02dcf4df02
branches:  netbsd-1-4
changeset: 471029:ef02dcf4df02
user:      he <he%NetBSD.org@localhost>
date:      Thu Oct 12 21:32:12 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/sd.c |  21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diffs (60 lines):

diff -r b1cf2c67b328 -r ef02dcf4df02 sys/arch/hp300/dev/sd.c
--- a/sys/arch/hp300/dev/sd.c   Thu Oct 12 21:32:09 2000 +0000
+++ b/sys/arch/hp300/dev/sd.c   Thu Oct 12 21:32:12 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sd.c,v 1.36 1998/01/12 18:31:10 thorpej Exp $  */
+/*     $NetBSD: sd.c,v 1.36.8.1 2000/10/12 21:32:12 he 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
@@ -294,6 +299,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