summaryrefslogtreecommitdiff
path: root/sys/dev/ic/oosiop.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2010-03-23 01:57:21 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2010-03-23 01:57:21 +0000
commitcd948c1fd3a45bb8ee18483b4f8df6ce849f8140 (patch)
tree2748525ad92550d0ad2b46b5619c24e5bcda0e13 /sys/dev/ic/oosiop.c
parente88d321d148e115dbbf6fea61f7c0dcb67021421 (diff)
Change the scsi_cmd function member of scsi_adapter from int to
void. Use XS_NO_CCB error in the scsi command (xs) to report the NO_CCB condition. Eliminates all SUCCESSFULLY_QUEUED and COMPLETE confusion and untangles the midlayer from the adapter a bit more. Eyes and some fixes by miod@ There may be some compile issues on little used (i.e. I don't have any) drivers but the change is mechanical and thus easy to remedy. ok dlg@
Diffstat (limited to 'sys/dev/ic/oosiop.c')
-rw-r--r--sys/dev/ic/oosiop.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c
index 304b2140756..e417c83541c 100644
--- a/sys/dev/ic/oosiop.c
+++ b/sys/dev/ic/oosiop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: oosiop.c,v 1.13 2010/01/10 00:10:23 krw Exp $ */
+/* $OpenBSD: oosiop.c,v 1.14 2010/03/23 01:57:19 krw Exp $ */
/* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */
/*
@@ -79,7 +79,7 @@ void oosiop_phasemismatch(struct oosiop_softc *);
void oosiop_setup_syncxfer(struct oosiop_softc *);
void oosiop_set_syncparam(struct oosiop_softc *, int, int, int);
void oosiop_minphys(struct buf *, struct scsi_link *);
-int oosiop_scsicmd(struct scsi_xfer *);
+void oosiop_scsicmd(struct scsi_xfer *);
void oosiop_done(struct oosiop_softc *, struct oosiop_cb *);
void oosiop_timeout(void *);
void oosiop_reset(struct oosiop_softc *);
@@ -712,7 +712,7 @@ oosiop_minphys(struct buf *bp, struct scsi_link *sl)
minphys(bp);
}
-int
+void
oosiop_scsicmd(struct scsi_xfer *xs)
{
struct oosiop_softc *sc;
@@ -748,7 +748,7 @@ oosiop_scsicmd(struct scsi_xfer *xs)
scsi_done(xs);
TAILQ_INSERT_TAIL(&sc->sc_free_cb, cb, chain);
splx(s);
- return (COMPLETE);
+ return;
}
bus_dmamap_sync(sc->sc_dmat, cb->cmddma, 0, xs->cmdlen,
BUS_DMASYNC_PREWRITE);
@@ -771,7 +771,7 @@ oosiop_scsicmd(struct scsi_xfer *xs)
scsi_done(xs);
TAILQ_INSERT_TAIL(&sc->sc_free_cb, cb, chain);
splx(s);
- return (COMPLETE);
+ return;
}
bus_dmamap_sync(sc->sc_dmat, cb->datadma,
0, xs->datalen,
@@ -806,11 +806,6 @@ oosiop_scsicmd(struct scsi_xfer *xs)
}
if (dopoll)
oosiop_poll(sc, cb);
-
- if (xs->flags & (SCSI_POLL | ITSDONE))
- return (COMPLETE);
- else
- return (SUCCESSFULLY_QUEUED);
}
void