diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/glxsb/glxsb.c | 2 | ||||
-rw-r--r-- | sys/dev/hifn/hifn7751.c | 2 | ||||
-rw-r--r-- | sys/dev/rndtest/rndtest.c | 2 | ||||
-rw-r--r-- | sys/dev/safe/safe.c | 2 | ||||
-rw-r--r-- | sys/dev/ubsec/ubsec.c | 2 | ||||
-rw-r--r-- | sys/mips/cavium/octeon_rnd.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/glxsb/glxsb.c b/sys/dev/glxsb/glxsb.c index aa1721742d6b..52041534da3e 100644 --- a/sys/dev/glxsb/glxsb.c +++ b/sys/dev/glxsb/glxsb.c @@ -476,7 +476,7 @@ glxsb_rnd(void *v) if (status & SB_RNS_TRNG_VALID) { value = bus_read_4(sc->sc_sr, SB_RANDOM_NUM); /* feed with one uint32 */ - random_harvest(&value, 4, 32, 0, RANDOM_PURE); + random_harvest(&value, 4, 32/2, 0, RANDOM_PURE); } callout_reset(&sc->sc_rngco, sc->sc_rnghz, glxsb_rnd, sc); diff --git a/sys/dev/hifn/hifn7751.c b/sys/dev/hifn/hifn7751.c index c5c5af1b3fa4..ae6c5ac6353b 100644 --- a/sys/dev/hifn/hifn7751.c +++ b/sys/dev/hifn/hifn7751.c @@ -258,7 +258,7 @@ hifn_partname(struct hifn_softc *sc) static void default_harvest(struct rndtest_state *rsp, void *buf, u_int count) { - random_harvest(buf, count, count*NBBY, 0, RANDOM_PURE); + random_harvest(buf, count, count*NBBY/2, 0, RANDOM_PURE); } static u_int diff --git a/sys/dev/rndtest/rndtest.c b/sys/dev/rndtest/rndtest.c index 13ecdd6b0105..3c42972c36f7 100644 --- a/sys/dev/rndtest/rndtest.c +++ b/sys/dev/rndtest/rndtest.c @@ -152,7 +152,7 @@ rndtest_harvest(struct rndtest_state *rsp, void *buf, u_int len) for (len /= sizeof (u_int32_t); len; len--) add_true_randomness(*p++); #else - random_harvest(buf, len, len*NBBY, 0, RANDOM_PURE); + random_harvest(buf, len, len*NBBY/2, 0, RANDOM_PURE); #endif } } diff --git a/sys/dev/safe/safe.c b/sys/dev/safe/safe.c index 6bfcf26032f4..721b9f4b2b60 100644 --- a/sys/dev/safe/safe.c +++ b/sys/dev/safe/safe.c @@ -211,7 +211,7 @@ safe_partname(struct safe_softc *sc) static void default_harvest(struct rndtest_state *rsp, void *buf, u_int count) { - random_harvest(buf, count, count*NBBY, 0, RANDOM_PURE); + random_harvest(buf, count, count*NBBY/2, 0, RANDOM_PURE); } #endif /* SAFE_NO_RNG */ diff --git a/sys/dev/ubsec/ubsec.c b/sys/dev/ubsec/ubsec.c index 2c0fad4fa93f..0e1b7cb5df67 100644 --- a/sys/dev/ubsec/ubsec.c +++ b/sys/dev/ubsec/ubsec.c @@ -259,7 +259,7 @@ ubsec_partname(struct ubsec_softc *sc) static void default_harvest(struct rndtest_state *rsp, void *buf, u_int count) { - random_harvest(buf, count, count*NBBY, 0, RANDOM_PURE); + random_harvest(buf, count, count*NBBY/2, 0, RANDOM_PURE); } static int diff --git a/sys/mips/cavium/octeon_rnd.c b/sys/mips/cavium/octeon_rnd.c index 634a4fa86f04..298f06aee1dd 100644 --- a/sys/mips/cavium/octeon_rnd.c +++ b/sys/mips/cavium/octeon_rnd.c @@ -131,7 +131,7 @@ octeon_rnd_harvest(void *arg) for (i = 0; i < OCTEON_RND_WORDS; i++) sc->sc_entropy[i] = cvmx_rng_get_random64(); random_harvest(sc->sc_entropy, sizeof sc->sc_entropy, - sizeof sc->sc_entropy * 8, 0, RANDOM_PURE); + (sizeof(sc->sc_entropy)*8)/2, 0, RANDOM_PURE); callout_reset(&sc->sc_callout, hz * 5, octeon_rnd_harvest, sc); } |