diff options
-rw-r--r-- | sys/dev/ic/ami.c | 27 | ||||
-rw-r--r-- | sys/dev/ic/amivar.h | 11 |
2 files changed, 6 insertions, 32 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); } diff --git a/sys/dev/ic/amivar.h b/sys/dev/ic/amivar.h index 944eabcb985..c8a92b4a7a0 100644 --- a/sys/dev/ic/amivar.h +++ b/sys/dev/ic/amivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: amivar.h,v 1.40 2006/03/19 11:53:23 dlg Exp $ */ +/* $OpenBSD: amivar.h,v 1.41 2006/03/20 09:59:26 dlg Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -54,16 +54,9 @@ struct ami_ccb { struct ami_sgent *ccb_sglist; paddr_t ccb_sglistpa; int ccb_offset; + bus_dmamap_t ccb_dmamap; struct scsi_xfer *ccb_xs; - - void *ccb_data; - int ccb_len; - enum { - AMI_CCB_IN, - AMI_CCB_OUT - } ccb_dir; - bus_dmamap_t ccb_dmamap; int (*ccb_done)(struct ami_softc *sc, struct ami_ccb *ccb); |