diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-03-20 09:59:27 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-03-20 09:59:27 +0000 |
commit | 31b7e2bdeb0dbb5a83a7f2a4e5db1b28dd448032 (patch) | |
tree | 6f20201ace1f38818b37ddc5320ea13c770e3184 /sys/dev/ic/ami.c | |
parent | 673b9004300ba67bc14dfe968847e3feee49cf88 (diff) |
remove the bits in the ccb for generalised handling of dmaable memory.
now that each code path that puts commands on the hardware has specific
completion routines, we dont have to deal with the memory magic in a
generic fashion.
Diffstat (limited to 'sys/dev/ic/ami.c')
-rw-r--r-- | sys/dev/ic/ami.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index e0434435ac8..4f0c69e9387 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.131 2006/03/20 09:46:28 dlg Exp $ */ +/* $OpenBSD: ami.c,v 1.132 2006/03/20 09:59:26 dlg Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -186,7 +186,6 @@ ami_put_ccb(struct ami_ccb *ccb) ccb->ccb_state = AMI_CCB_FREE; ccb->ccb_wakeup = 0; - ccb->ccb_data = NULL; ccb->ccb_xs = NULL; ccb->ccb_flags = 0; ccb->ccb_done = NULL; @@ -1189,27 +1188,9 @@ ami_done_ccb(struct ami_softc *sc, struct ami_ccb *ccb) { int s; - if (ccb->ccb_data != NULL) { - bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmamap, 0, - ccb->ccb_dmamap->dm_mapsize, - (ccb->ccb_dir == AMI_CCB_IN) ? - BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); - - bus_dmamap_sync(sc->sc_dmat, AMIMEM_MAP(sc->sc_ccbmem_am), - ccb->ccb_offset, sizeof(struct ami_ccbmem), - BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - - bus_dmamap_unload(sc->sc_dmat, ccb->ccb_dmamap); - } - - if (ccb->ccb_wakeup) { - ccb->ccb_wakeup = 0; - wakeup(ccb); - } else { - s = splbio(); - ami_put_ccb(ccb); - splx(s); - } + s = splbio(); + ami_put_ccb(ccb); + splx(s); return (0); } |