From a0106c6a9dee01bef35fff2c0aa9a2e8d7994fec Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 13 May 2005 15:22:38 +0000 Subject: Do not invoke hil_process_pendinc() from the interrupt handler if the loop is marked as busy. --- sys/dev/hil/hil.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'sys/dev/hil') diff --git a/sys/dev/hil/hil.c b/sys/dev/hil/hil.c index 6338422017c..272b35b7ea9 100644 --- a/sys/dev/hil/hil.c +++ b/sys/dev/hil/hil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hil.c,v 1.19 2005/05/08 11:38:09 miod Exp $ */ +/* $OpenBSD: hil.c,v 1.20 2005/05/13 15:22:37 miod Exp $ */ /* * Copyright (c) 2003, 2004, Miodrag Vallat. * All rights reserved. @@ -252,11 +252,7 @@ hil_attach_deferred(void *v) * Reconfigure if necessary */ sc->sc_status = HIL_STATUS_READY; - if (sc->sc_pending == HIL_PENDING_RECONFIG) { - sc->sc_pending = 0; - hilconfig(sc, 0); - } else - sc->sc_pending = 0; + hil_process_pending(sc); } /* @@ -278,7 +274,8 @@ hil_intr(void *v) DELAY(1); hil_process_int(sc, stat, c); - hil_process_pending(sc); + if (sc->sc_status != HIL_STATUS_BUSY) + hil_process_pending(sc); return (1); } @@ -456,7 +453,6 @@ hilconfig(struct hil_softc *sc, u_int knowndevs) { struct hil_attach_args ha; u_int8_t db; - u_int oldmax; int id, s; s = splhil(); @@ -466,7 +462,6 @@ hilconfig(struct hil_softc *sc, u_int knowndevs) */ db = 0; send_hil_cmd(sc, HIL_READLPSTAT, NULL, 0, &db); - oldmax = sc->sc_maxdev; sc->sc_maxdev = db & LPS_DEVMASK; #ifdef HILDEBUG printf("%s: %d device(s)\n", sc->sc_dev.dv_xname, sc->sc_maxdev); -- cgit v1.2.3