diff options
Diffstat (limited to 'sys/dev/ic/cac.c')
-rw-r--r-- | sys/dev/ic/cac.c | 11 |
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); } |