diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-11-07 00:01:03 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-11-07 00:01:03 +0000 |
commit | 9d6b087d3f989392f5f24091f34f9117bd7c5038 (patch) | |
tree | 0bb174faca2eb8b613b89e53cb993a17eff4c8c2 /sys | |
parent | d44b5e154def76db232872454c7afa0d58755be8 (diff) |
More SPLBIO around scsi_done.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/oosiop.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c index c66ef7f0f39..1f95eb0a388 100644 --- a/sys/dev/ic/oosiop.c +++ b/sys/dev/ic/oosiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: oosiop.c,v 1.7 2007/11/05 00:21:36 krw Exp $ */ +/* $OpenBSD: oosiop.c,v 1.8 2007/11/07 00:01:02 krw Exp $ */ /* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */ /* @@ -725,7 +725,6 @@ oosiop_scsicmd(struct scsi_xfer *xs) s = splbio(); cb = TAILQ_FIRST(&sc->sc_free_cb); TAILQ_REMOVE(&sc->sc_free_cb, cb, chain); - splx(s); cb->xs = xs; cb->xsflags = xs->flags; @@ -747,6 +746,7 @@ oosiop_scsicmd(struct scsi_xfer *xs) xs->error = XS_DRIVER_STUFFUP; scsi_done(xs); TAILQ_INSERT_TAIL(&sc->sc_free_cb, cb, chain); + splx(s); return (COMPLETE); } bus_dmamap_sync(sc->sc_dmat, cb->cmddma, 0, xs->cmdlen, @@ -769,6 +769,7 @@ oosiop_scsicmd(struct scsi_xfer *xs) bus_dmamap_unload(sc->sc_dmat, cb->cmddma); scsi_done(xs); TAILQ_INSERT_TAIL(&sc->sc_free_cb, cb, chain); + splx(s); return (COMPLETE); } bus_dmamap_sync(sc->sc_dmat, cb->datadma, @@ -778,9 +779,9 @@ oosiop_scsicmd(struct scsi_xfer *xs) xfer->status = SCSI_OOSIOP_NOSTATUS; - oosiop_setup(sc, cb); + splx(s); - s = splbio(); + oosiop_setup(sc, cb); /* * Always initialize timeout so it does not contain trash @@ -801,8 +802,6 @@ oosiop_scsicmd(struct scsi_xfer *xs) timeout_add(&xs->stimeout, (xs->timeout / 1000) * hz); } - splx(s); - if (xs->flags & (SCSI_POLL | ITSDONE)) return (COMPLETE); else |