summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-06-02 16:26:41 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-06-02 16:26:41 +0000
commitf45badc69b6563d9fbb74c3ce6844a1371dfe3f9 (patch)
tree0acbc2eb4660f7c16025e363160afe39cf9aa9ae /sys/dev/ic
parent029d9af4192b39235c3faa5fa5bc4a267ec5eace (diff)
do not play w/ interrupts too much and keep 'em enabled at all times, fixes random lockups; tested by brad@ on all models
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/cac.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c
index c6d178698d5..624dc3093f6 100644
--- a/sys/dev/ic/cac.c
+++ b/sys/dev/ic/cac.c
@@ -1,8 +1,8 @@
-/* $OpenBSD: cac.c,v 1.14 2003/04/27 11:22:52 ho Exp $ */
+/* $OpenBSD: cac.c,v 1.15 2003/06/02 16:26:40 mickey Exp $ */
/* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */
/*
- * Copyright (c) 2001 Michael Shalayeff
+ * Copyright (c) 2001,2003 Michael Shalayeff
* All rights reserved.
*
* The SCSI emulation layer is derived from gdt(4) driver,
@@ -254,6 +254,8 @@ cac_init(struct cac_softc *sc, int startfw)
if (cac_sdh == NULL)
cac_sdh = shutdownhook_establish(cac_shutdown, NULL);
+ (*sc->sc_cl->cl_intr_enable)(sc, 1);
+
return (0);
}
@@ -301,7 +303,6 @@ cac_intr(v)
if (!(istat = (sc->sc_cl->cl_intr_pending)(sc)))
return 0;
- (*sc->sc_cl->cl_intr_enable)(sc, 0);
if (istat & CAC_INTR_FIFO_NEMPTY)
while ((ccb = (*sc->sc_cl->cl_completed)(sc)) != NULL) {
ret = 1;
@@ -377,7 +378,6 @@ cac_cmd(struct cac_softc *sc, int command, void *data, int datasize,
ccb->ccb_datasize = size;
ccb->ccb_xs = xs;
- (*sc->sc_cl->cl_intr_enable)(sc, 0);
if (!xs || xs->flags & SCSI_POLL) {
/* Synchronous commands musn't wait. */
@@ -389,7 +389,6 @@ cac_cmd(struct cac_softc *sc, int command, void *data, int datasize,
(*sc->sc_cl->cl_submit)(sc, ccb);
rv = cac_ccb_poll(sc, ccb, 2000);
}
- (*sc->sc_cl->cl_intr_enable)(sc, 1);
} else
rv = cac_ccb_start(sc, ccb);
@@ -436,8 +435,6 @@ cac_ccb_start(struct cac_softc *sc, struct cac_ccb *ccb)
(*sc->sc_cl->cl_submit)(sc, ccb);
}
- (*sc->sc_cl->cl_intr_enable)(sc, 1);
-
return (0);
}