diff options
| author | thorpej <thorpej@NetBSD.org> | 1998-02-04 05:12:46 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 1998-02-04 05:12:46 +0000 |
| commit | 8abe76d2f09ed46db2694080253e1623501ac3f7 (patch) | |
| tree | 16a9f663c517aab7299fd828dd585608afccb293 /sys/dev | |
| parent | 99cc8482d1b6d02bcdee248c019e5e8b3767e1a1 (diff) | |
Add offset and length parameters to bus_dmamap_sync(), used for specifiying
partial syncs of a DMA mapping.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/eisa/ahb.c | 10 | ||||
| -rw-r--r-- | sys/dev/ic/aha.c | 10 | ||||
| -rw-r--r-- | sys/dev/ic/bha.c | 10 | ||||
| -rw-r--r-- | sys/dev/ic/uha.c | 10 | ||||
| -rw-r--r-- | sys/dev/isa/isadma.c | 12 | ||||
| -rw-r--r-- | sys/dev/isa/wds.c | 10 | ||||
| -rw-r--r-- | sys/dev/pci/if_fxp.c | 13 | ||||
| -rw-r--r-- | sys/dev/pci/isp_pci.c | 8 | ||||
| -rw-r--r-- | sys/dev/vme/xd.c | 12 | ||||
| -rw-r--r-- | sys/dev/vme/xy.c | 12 |
10 files changed, 64 insertions, 43 deletions
diff --git a/sys/dev/eisa/ahb.c b/sys/dev/eisa/ahb.c index edb105b20d5..1f54376c55e 100644 --- a/sys/dev/eisa/ahb.c +++ b/sys/dev/eisa/ahb.c @@ -1,4 +1,4 @@ -/* $NetBSD: ahb.c,v 1.16 1998/02/04 00:35:57 thorpej Exp $ */ +/* $NetBSD: ahb.c,v 1.17 1998/02/04 05:13:39 thorpej Exp $ */ #undef AHBDEBUG #ifdef DDB @@ -8,7 +8,7 @@ #endif /*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. + * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -731,7 +731,8 @@ ahb_done(sc, ecb) * the data buffer. */ if (xs->datalen) { - bus_dmamap_sync(dmat, ecb->dmamap_xfer, + bus_dmamap_sync(dmat, ecb->dmamap_xfer, 0, + ecb->dmamap_xfer->dm_mapsize, (xs->flags & SCSI_DATA_IN) ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(dmat, ecb->dmamap_xfer); @@ -1067,7 +1068,8 @@ ahb_scsi_cmd(xs) goto bad; } - bus_dmamap_sync(dmat, ecb->dmamap_xfer, + bus_dmamap_sync(dmat, ecb->dmamap_xfer, 0, + ecb->dmamap_xfer->dm_mapsize, (flags & SCSI_DATA_IN) ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); diff --git a/sys/dev/ic/aha.c b/sys/dev/ic/aha.c index c22712f7774..4808bff0bcf 100644 --- a/sys/dev/ic/aha.c +++ b/sys/dev/ic/aha.c @@ -1,4 +1,4 @@ -/* $NetBSD: aha.c,v 1.13 1998/02/04 00:36:54 thorpej Exp $ */ +/* $NetBSD: aha.c,v 1.14 1998/02/04 05:14:03 thorpej Exp $ */ #undef AHADIAG #ifdef DDB @@ -8,7 +8,7 @@ #endif /*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. + * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -842,7 +842,8 @@ aha_done(sc, ccb) * the data buffer. */ if (xs->datalen) { - bus_dmamap_sync(dmat, ccb->dmamap_xfer, + bus_dmamap_sync(dmat, ccb->dmamap_xfer, 0, + ccb->dmamap_xfer->dm_mapsize, (xs->flags & SCSI_DATA_IN) ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(dmat, ccb->dmamap_xfer); @@ -1377,7 +1378,8 @@ aha_scsi_cmd(xs) goto bad; } - bus_dmamap_sync(dmat, ccb->dmamap_xfer, + bus_dmamap_sync(dmat, ccb->dmamap_xfer, 0, + ccb->dmamap_xfer->dm_mapsize, (flags & SCSI_DATA_IN) ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); diff --git a/sys/dev/ic/bha.c b/sys/dev/ic/bha.c index 86a601722e8..fa2134d02a2 100644 --- a/sys/dev/ic/bha.c +++ b/sys/dev/ic/bha.c @@ -1,4 +1,4 @@ -/* $NetBSD: bha.c,v 1.20 1998/02/04 00:36:52 thorpej Exp $ */ +/* $NetBSD: bha.c,v 1.21 1998/02/04 05:14:01 thorpej Exp $ */ #undef BHADIAG #ifdef DDB @@ -8,7 +8,7 @@ #endif /*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. + * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -855,7 +855,8 @@ bha_done(sc, ccb) * the data buffer. */ if (xs->datalen) { - bus_dmamap_sync(dmat, ccb->dmamap_xfer, + bus_dmamap_sync(dmat, ccb->dmamap_xfer, 0, + ccb->dmamap_xfer->dm_mapsize, (xs->flags & SCSI_DATA_IN) ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(dmat, ccb->dmamap_xfer); @@ -1492,7 +1493,8 @@ bha_scsi_cmd(xs) goto bad; } - bus_dmamap_sync(dmat, ccb->dmamap_xfer, + bus_dmamap_sync(dmat, ccb->dmamap_xfer, 0, + ccb->dmamap_xfer->dm_mapsize, (flags & SCSI_DATA_IN) ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); diff --git a/sys/dev/ic/uha.c b/sys/dev/ic/uha.c index b9ebdadc523..17d35803163 100644 --- a/sys/dev/ic/uha.c +++ b/sys/dev/ic/uha.c @@ -1,4 +1,4 @@ -/* $NetBSD: uha.c,v 1.14 1998/02/04 00:36:53 thorpej Exp $ */ +/* $NetBSD: uha.c,v 1.15 1998/02/04 05:14:02 thorpej Exp $ */ #undef UHADEBUG #ifdef DDB @@ -8,7 +8,7 @@ #endif /*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. + * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -465,7 +465,8 @@ uha_done(sc, mscp) * the data buffer. */ if (xs->datalen) { - bus_dmamap_sync(dmat, mscp->dmamap_xfer, + bus_dmamap_sync(dmat, mscp->dmamap_xfer, 0, + mscp->dmamap_xfer->dm_mapsize, (xs->flags & SCSI_DATA_IN) ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(dmat, mscp->dmamap_xfer); @@ -677,7 +678,8 @@ uha_scsi_cmd(xs) goto bad; } - bus_dmamap_sync(dmat, mscp->dmamap_xfer, + bus_dmamap_sync(dmat, mscp->dmamap_xfer, 0, + mscp->dmamap_xfer->dm_mapsize, (flags & SCSI_DATA_IN) ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); diff --git a/sys/dev/isa/isadma.c b/sys/dev/isa/isadma.c index fdda9d773eb..c6374b7bff6 100644 --- a/sys/dev/isa/isadma.c +++ b/sys/dev/isa/isadma.c @@ -1,7 +1,7 @@ -/* $NetBSD: isadma.c,v 1.32 1997/09/05 01:48:33 thorpej Exp $ */ +/* $NetBSD: isadma.c,v 1.33 1998/02/04 05:14:35 thorpej Exp $ */ /*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. + * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -285,10 +285,12 @@ isa_dmastart(isadev, chan, addr, nbytes, p, flags, busdmaflags) #endif if (flags & DMAMODE_READ) { - bus_dmamap_sync(sc->sc_dmat, dmam, BUS_DMASYNC_PREREAD); + bus_dmamap_sync(sc->sc_dmat, dmam, 0, dmam->dm_mapsize, + BUS_DMASYNC_PREREAD); sc->sc_dmareads |= (1 << chan); } else { - bus_dmamap_sync(sc->sc_dmat, dmam, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->sc_dmat, dmam, 0, dmam->dm_mapsize, + BUS_DMASYNC_PREWRITE); sc->sc_dmareads &= ~(1 << chan); } @@ -464,7 +466,7 @@ isa_dmadone(isadev, chan) printf("%s: isa_dmadone: channel %d not finished\n", sc->sc_dev.dv_xname, chan); - bus_dmamap_sync(sc->sc_dmat, dmam, + bus_dmamap_sync(sc->sc_dmat, dmam, 0, dmam->dm_mapsize, (sc->sc_dmareads & (1 << chan)) ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c index 39f3d321fe4..3bf1a6abd5d 100644 --- a/sys/dev/isa/wds.c +++ b/sys/dev/isa/wds.c @@ -1,4 +1,4 @@ -/* $NetBSD: wds.c,v 1.29 1998/02/04 00:37:50 thorpej Exp $ */ +/* $NetBSD: wds.c,v 1.30 1998/02/04 05:14:36 thorpej Exp $ */ #undef WDSDIAG #ifdef DDB @@ -15,7 +15,7 @@ */ /*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. + * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -891,7 +891,8 @@ wds_done(sc, scb, stat) * the data buffer. */ if (xs->datalen) { - bus_dmamap_sync(dmat, scb->dmamap_xfer, + bus_dmamap_sync(dmat, scb->dmamap_xfer, 0, + scb->dmamap_xfer->dm_mapsize, (xs->flags & SCSI_DATA_IN) ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(dmat, scb->dmamap_xfer); @@ -1338,7 +1339,8 @@ wds_scsi_cmd(xs) goto bad; } - bus_dmamap_sync(dmat, scb->dmamap_xfer, + bus_dmamap_sync(dmat, scb->dmamap_xfer, 0, + scb->dmamap_xfer->dm_mapsize, (flags & SCSI_DATA_IN) ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); diff --git a/sys/dev/pci/if_fxp.c b/sys/dev/pci/if_fxp.c index ac58fdc8ace..e162f9438b7 100644 --- a/sys/dev/pci/if_fxp.c +++ b/sys/dev/pci/if_fxp.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_fxp.c,v 1.12 1998/02/04 00:38:50 thorpej Exp $ */ +/* $NetBSD: if_fxp.c,v 1.13 1998/02/04 05:14:55 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -824,7 +824,8 @@ fxp_start(ifp) dmamap->dm_segs[segment].ds_len; } - bus_dmamap_sync(sc->sc_dmat, dmamap, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->sc_dmat, dmamap, 0, dmamap->dm_mapsize, + BUS_DMASYNC_PREWRITE); txp->tbd_number = dmamap->dm_nsegs; txp->cb_soft.mb_head = mb_head; @@ -919,8 +920,8 @@ fxp_intr(arg) sc->rfa_head = rxd->fr_next; rxd->fr_next = NULL; - bus_dmamap_sync(sc->sc_dmat, rxmap, - BUS_DMASYNC_POSTREAD); + bus_dmamap_sync(sc->sc_dmat, rxmap, 0, + rxmap->dm_mapsize, BUS_DMASYNC_POSTREAD); /* * Add a new buffer to the receive chain. @@ -991,6 +992,7 @@ fxp_intr(arg) if (txp->cb_soft.mb_head != NULL) { txmap = txp->cb_soft.dmamap; bus_dmamap_sync(sc->sc_dmat, txmap, + 0, txmap->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txmap); m_freem(txp->cb_soft.mb_head); @@ -1510,7 +1512,8 @@ fxp_add_rfabuf(sc, rxd) } } - bus_dmamap_sync(sc->sc_dmat, rxmap, BUS_DMASYNC_PREREAD); + bus_dmamap_sync(sc->sc_dmat, rxmap, 0, rxmap->dm_mapsize, + BUS_DMASYNC_PREREAD); /* * Move the data pointer up so that the incoming data packet diff --git a/sys/dev/pci/isp_pci.c b/sys/dev/pci/isp_pci.c index b84dd3cb093..32413e3d5ce 100644 --- a/sys/dev/pci/isp_pci.c +++ b/sys/dev/pci/isp_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: isp_pci.c,v 1.18 1998/02/04 00:38:52 thorpej Exp $ */ +/* $NetBSD: isp_pci.c,v 1.19 1998/02/04 05:14:56 thorpej Exp $ */ /* * PCI specific probe and attach routines for Qlogic ISP SCSI adapters. @@ -537,7 +537,8 @@ isp_pci_dmasetup(isp, xs, rq, iptrp, optr) } while (seg < segcnt); mapsync: - bus_dmamap_sync(pci->pci_dmat, dmap, xs->flags & SCSI_DATA_IN ? + bus_dmamap_sync(pci->pci_dmat, dmap, 0, dmap->dm_mapsize, + xs->flags & SCSI_DATA_IN ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); return (0); } @@ -551,7 +552,8 @@ isp_pci_dmateardown(isp, xs, handle) struct isp_pcisoftc *pci = (struct isp_pcisoftc *)isp; bus_dmamap_t dmap = pci->pci_xfer_dmap[handle]; - bus_dmamap_sync(pci->pci_dmat, dmap, xs->flags & SCSI_DATA_IN ? + bus_dmamap_sync(pci->pci_dmat, dmap, 0, dmap->dm_mapsize, + xs->flags & SCSI_DATA_IN ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(pci->pci_dmat, dmap); } diff --git a/sys/dev/vme/xd.c b/sys/dev/vme/xd.c index 38656c9dcdc..dd0f8af1091 100644 --- a/sys/dev/vme/xd.c +++ b/sys/dev/vme/xd.c @@ -1,4 +1,4 @@ -/* $NetBSD: xd.c,v 1.8 1998/02/04 01:19:23 pk Exp $ */ +/* $NetBSD: xd.c,v 1.9 1998/02/04 05:15:16 thorpej Exp $ */ /* * @@ -1498,8 +1498,8 @@ xdc_startbuf(xdcsc, xdsc, bp) return (XD_ERR_FAIL); /* XXX: need some sort of * call-back scheme here? */ } - bus_dmamap_sync(xdcsc->dmatag, iorq->dmamap, - (bp->b_flags & B_READ) + bus_dmamap_sync(xdcsc->dmatag, iorq->dmamap, 0, + iorq->dmamap->dm_mapsize, (bp->b_flags & B_READ) ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); @@ -1791,7 +1791,8 @@ xdc_reset(xdcsc, quiet, blastmode, error, xdsc) iorq->buf->b_resid = iorq->sectcnt * XDFM_BPS; - bus_dmamap_sync(xdcsc->dmatag, iorq->dmamap, + bus_dmamap_sync(xdcsc->dmatag, iorq->dmamap, 0, + iorq->dmamap->dm_mapsize, (iorq->buf->b_flags & B_READ) ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); @@ -2001,7 +2002,8 @@ xdc_remove_iorq(xdcsc) } else { bp->b_resid = 0; /* done */ } - bus_dmamap_sync(xdcsc->dmatag, iorq->dmamap, + bus_dmamap_sync(xdcsc->dmatag, iorq->dmamap, 0, + iorq->dmamap->dm_mapsize, (bp->b_flags & B_READ) ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); diff --git a/sys/dev/vme/xy.c b/sys/dev/vme/xy.c index 9f059c077de..31734378f45 100644 --- a/sys/dev/vme/xy.c +++ b/sys/dev/vme/xy.c @@ -1,4 +1,4 @@ -/* $NetBSD: xy.c,v 1.6 1998/02/04 00:54:27 pk Exp $ */ +/* $NetBSD: xy.c,v 1.7 1998/02/04 05:15:17 thorpej Exp $ */ /* * @@ -1328,8 +1328,8 @@ xyc_startbuf(xycsc, xysc, bp) * call-back scheme here? */ } - bus_dmamap_sync(xycsc->dmatag, iorq->dmamap, - (bp->b_flags & B_READ) + bus_dmamap_sync(xycsc->dmatag, iorq->dmamap, 0, + iorq->dmamap->dm_mapsize, (bp->b_flags & B_READ) ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); @@ -1674,7 +1674,8 @@ xyc_reset(xycsc, quiet, blastmode, error, xysc) iorq->buf->b_flags |= B_ERROR; iorq->buf->b_resid = iorq->sectcnt * XYFM_BPS; - bus_dmamap_sync(xycsc->dmatag, iorq->dmamap, + bus_dmamap_sync(xycsc->dmatag, iorq->dmamap, 0, + iorq->dmamap->dm_mapsize, (iorq->buf->b_flags & B_READ) ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); @@ -1856,7 +1857,8 @@ xyc_remove_iorq(xycsc) } else { bp->b_resid = 0; /* done */ } - bus_dmamap_sync(xycsc->dmatag, iorq->dmamap, + bus_dmamap_sync(xycsc->dmatag, iorq->dmamap, 0, + iorq->dmamap->dm_mapsize, (iorq->buf->b_flags & B_READ) ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE); |
