summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/i386/pci/pchb.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/sys/arch/i386/pci/pchb.c b/sys/arch/i386/pci/pchb.c
index bcab5f7bb48..b0ac4cfddfe 100644
--- a/sys/arch/i386/pci/pchb.c
+++ b/sys/arch/i386/pci/pchb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pchb.c,v 1.24 2000/11/08 13:12:40 art Exp $ */
+/* $OpenBSD: pchb.c,v 1.25 2000/12/25 19:44:43 mickey Exp $ */
/* $NetBSD: pchb.c,v 1.6 1997/06/06 23:29:16 thorpej Exp $ */
/*
@@ -370,23 +370,22 @@ pchb_rnd(v)
void *v;
{
struct pchb_softc *sc = v;
- int ret;
/*
* Don't wait for data to be ready. If it's not there, we'll check
* next time.
*/
- if (!(bus_space_read_1(sc->bt, sc->bh, I82802_RNG_RNGST) &
- I82802_RNG_RNGST_DATAV))
- goto out;
- ret = bus_space_read_1(sc->bt, sc->bh, I82802_RNG_DATA);
-
- if (sc->i--) {
- sc->ax = (sc->ax << 8) | ret;
- } else {
- sc->i = 4;
- add_true_randomness(sc->ax);
+ if ((bus_space_read_1(sc->bt, sc->bh, I82802_RNG_RNGST) &
+ I82802_RNG_RNGST_DATAV)) {
+
+ sc->ax = (sc->ax << 8) |
+ bus_space_read_1(sc->bt, sc->bh, I82802_RNG_DATA);
+
+ if (!sc->i--) {
+ sc->i = 4;
+ add_true_randomness(sc->ax);
+ }
}
-out:
+
timeout_add(&sc->sc_tmo, 1);
}