Add BUS_DMA_STREAMING to data transfer maps.

This commit is contained in:
thorpej 2001-03-07 23:07:12 +00:00
parent 4e45315377
commit fd7ed72be1
12 changed files with 58 additions and 51 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: adv.c,v 1.20 2000/11/14 18:21:00 thorpej Exp $ */
/* $NetBSD: adv.c,v 1.21 2001/03/07 23:07:12 thorpej Exp $ */
/*
* Generic driver for the Advanced Systems Inc. Narrow SCSI controllers
@ -675,15 +675,17 @@ adv_scsi_cmd(xs)
*/
#ifdef TFS
if (flags & SCSI_DATA_UIO) {
error = bus_dmamap_load_uio(dmat,
ccb->dmamap_xfer, (struct uio *) xs->data,
(flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT : BUS_DMA_WAITOK);
error = bus_dmamap_load_uio(dmat, ccb->dmamap_xfer,
(struct uio *) xs->data,
((flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK) | BUS_DMA_STREAMING);
} else
#endif /* TFS */
{
error = bus_dmamap_load(dmat,
ccb->dmamap_xfer, xs->data, xs->datalen, NULL,
(flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT : BUS_DMA_WAITOK);
error = bus_dmamap_load(dmat, ccb->dmamap_xfer,
xs->data, xs->datalen, NULL,
((flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK) | BUS_DMA_STREAMING);
}
if (error) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: adw.c,v 1.27 2001/02/11 23:40:03 hpeyerl Exp $ */
/* $NetBSD: adw.c,v 1.28 2001/03/07 23:07:13 thorpej Exp $ */
/*
* Generic driver for the Advanced Systems Inc. SCSI controllers
@ -784,17 +784,17 @@ adw_build_req(xs, ccb, flags)
*/
#ifdef TFS
if (xs->xs_control & SCSI_DATA_UIO) {
error = bus_dmamap_load_uio(dmat,
ccb->dmamap_xfer, (struct uio *) xs->data,
(flags & XS_CTL_NOSLEEP) ?
BUS_DMA_NOWAIT : BUS_DMA_WAITOK);
error = bus_dmamap_load_uio(dmat, ccb->dmamap_xfer,
(struct uio *) xs->data,
((flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK) | BUS_DMA_STREAMING);
} else
#endif /* TFS */
{
error = bus_dmamap_load(dmat,
ccb->dmamap_xfer, xs->data, xs->datalen, NULL,
(flags & XS_CTL_NOSLEEP) ?
BUS_DMA_NOWAIT : BUS_DMA_WAITOK);
error = bus_dmamap_load(dmat, ccb->dmamap_xfer,
xs->data, xs->datalen, NULL,
((flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK) | BUS_DMA_STREAMING);
}
if (error) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: aha.c,v 1.29 2000/11/14 18:21:00 thorpej Exp $ */
/* $NetBSD: aha.c,v 1.30 2001/03/07 23:07:13 thorpej Exp $ */
#include "opt_ddb.h"
@ -1287,15 +1287,15 @@ aha_scsi_cmd(xs)
if (flags & XS_CTL_DATA_UIO) {
error = bus_dmamap_load_uio(dmat,
ccb->dmamap_xfer, (struct uio *)xs->data,
(flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK);
((flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK) | BUS_DMA_STREAMING);
} else
#endif
{
error = bus_dmamap_load(dmat,
ccb->dmamap_xfer, xs->data, xs->datalen, NULL,
(flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK);
((flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK) | BUS_DMA_STREAMING);
}
if (error) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: aic7xxx.c,v 1.66 2001/02/24 00:01:22 cgd Exp $ */
/* $NetBSD: aic7xxx.c,v 1.67 2001/03/07 23:07:13 thorpej Exp $ */
/*
* Generic driver for the aic7xxx based adaptec SCSI controllers
@ -4262,8 +4262,9 @@ ahc_setup_data(struct ahc_softc *ahc, struct scsipi_xfer *xs,
error = bus_dmamap_load(ahc->parent_dmat,
scb->dmamap, xs->data,
xs->datalen, NULL,
(xs->xs_control & XS_CTL_NOSLEEP) ?
BUS_DMA_NOWAIT : BUS_DMA_WAITOK);
((xs->xs_control & XS_CTL_NOSLEEP) ?
BUS_DMA_NOWAIT : BUS_DMA_WAITOK) |
BUS_DMA_STREAMING);
if (error) {
if (!ahc_istagged_device(ahc, xs, 0))
ahc_index_busy_tcl(ahc, hscb->tcl, TRUE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: bha.c,v 1.40 2000/11/21 05:23:37 soren Exp $ */
/* $NetBSD: bha.c,v 1.41 2001/03/07 23:07:14 thorpej Exp $ */
#include "opt_ddb.h"
#undef BHADIAG
@ -1400,15 +1400,15 @@ bha_scsi_cmd(xs)
if (flags & XS_CTL_DATA_UIO) {
error = bus_dmamap_load_uio(dmat,
ccb->dmamap_xfer, (struct uio *)xs->data,
(flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK);
((flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK) | BUS_DMA_STREAMING);
} else
#endif /* TFS */
{
error = bus_dmamap_load(dmat,
ccb->dmamap_xfer, xs->data, xs->datalen, NULL,
(flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK);
((flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK) | BUS_DMA_STREAMING);
}
if (error) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: cac.c,v 1.16 2000/12/11 13:19:50 ad Exp $ */
/* $NetBSD: cac.c,v 1.17 2001/03/07 23:07:15 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -288,7 +288,8 @@ cac_cmd(struct cac_softc *sc, int command, void *data, int datasize,
if ((flags & (CAC_CCB_DATA_IN | CAC_CCB_DATA_OUT)) != 0) {
bus_dmamap_load(sc->sc_dmat, ccb->ccb_dmamap_xfer,
(void *)data, datasize, NULL, BUS_DMA_NOWAIT);
(void *)data, datasize, NULL, BUS_DMA_NOWAIT |
BUS_DMA_STREAMING);
bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmamap_xfer, 0, datasize,
(flags & CAC_CCB_DATA_IN) != 0 ? BUS_DMASYNC_PREREAD :

View File

@ -1,4 +1,4 @@
/* $NetBSD: dpt.c,v 1.25 2001/02/24 00:03:12 cgd Exp $ */
/* $NetBSD: dpt.c,v 1.26 2001/03/07 23:07:15 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.25 2001/02/24 00:03:12 cgd Exp $");
__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.26 2001/03/07 23:07:15 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -902,14 +902,16 @@ dpt_scsi_cmd(xs)
#ifdef TFS
if ((flags & XS_CTL_DATA_UIO) != 0) {
error = bus_dmamap_load_uio(dmat, xfer,
(struct uio *)xs->data, (flags & XS_CTL_NOSLEEP) ?
BUS_DMA_NOWAIT : BUS_DMA_WAITOK);
(struct uio *)xs->data, ((flags & XS_CTL_NOSLEEP) ?
BUS_DMA_NOWAIT : BUS_DMA_WAITOK) |
BUS_DMA_STREAMING);
} else
#endif /* TFS */
{
error = bus_dmamap_load(dmat, xfer, xs->data,
xs->datalen, NULL, (flags & XS_CTL_NOSLEEP) ?
BUS_DMA_NOWAIT : BUS_DMA_WAITOK);
xs->datalen, NULL, ((flags & XS_CTL_NOSLEEP) ?
BUS_DMA_NOWAIT : BUS_DMA_WAITOK) |
BUS_DMA_STREAMING);
}
if (error) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: mlx.c,v 1.4 2001/02/12 19:04:35 ad Exp $ */
/* $NetBSD: mlx.c,v 1.5 2001/03/07 23:07:15 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -1872,7 +1872,7 @@ mlx_ccb_map(struct mlx_softc *mlx, struct mlx_ccb *mc, void *data, int size,
xfer = mc->mc_xfer_map;
rv = bus_dmamap_load(mlx->mlx_dmat, xfer, data, size, NULL,
BUS_DMA_NOWAIT);
BUS_DMA_NOWAIT | BUS_DMA_STREAMING);
if (rv != 0)
return (rv);

View File

@ -1,4 +1,4 @@
/* $NetBSD: siop.c,v 1.40 2001/03/01 22:10:57 thorpej Exp $ */
/* $NetBSD: siop.c,v 1.41 2001/03/07 23:07:15 thorpej Exp $ */
/*
* Copyright (c) 2000 Manuel Bouyer.
@ -1331,7 +1331,8 @@ siop_scsicmd(xs)
}
if (xs->xs_control & (XS_CTL_DATA_IN | XS_CTL_DATA_OUT)) {
error = bus_dmamap_load(sc->sc_dmat, siop_cmd->dmamap_data,
xs->data, xs->datalen, NULL, BUS_DMA_NOWAIT);
xs->data, xs->datalen, NULL, BUS_DMA_NOWAIT |
BUS_DMA_STREAMING);
if (error) {
printf("%s: unable to load data DMA map: %d\n",
sc->sc_dev.dv_xname, error);

View File

@ -1,4 +1,4 @@
/* $NetBSD: uha.c,v 1.24 2000/11/14 18:21:02 thorpej Exp $ */
/* $NetBSD: uha.c,v 1.25 2001/03/07 23:07:15 thorpej Exp $ */
#undef UHADEBUG
#ifdef DDB
@ -576,15 +576,15 @@ uha_scsi_cmd(xs)
if (flags & SCSI_DATA_UIO) {
error = bus_dmamap_load_uio(dmat,
mscp->dmamap_xfer, (struct uio *)xs->data,
(flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK);
((flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK) | BUS_DMA_STREAMING);
} else
#endif /*TFS */
{
error = bus_dmamap_load(dmat,
mscp->dmamap_xfer, xs->data, xs->datalen, NULL,
(flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK);
((flags & XS_CTL_NOSLEEP) ? BUS_DMA_NOWAIT :
BUS_DMA_WAITOK) | BUS_DMA_STREAMING);
}
if (error) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: isp_pci.c,v 1.66 2001/02/12 23:25:20 mjacob Exp $ */
/* $NetBSD: isp_pci.c,v 1.67 2001/03/07 23:07:16 thorpej Exp $ */
/*
* This driver, which is contained in NetBSD in the files:
*
@ -874,8 +874,8 @@ isp_pci_dmasetup(isp, xs, rq, iptrp, optr)
}
}
error = bus_dmamap_load(pcs->pci_dmat, dmap, xs->data, xs->datalen,
NULL, xs->xs_control & XS_CTL_NOSLEEP ?
BUS_DMA_NOWAIT : BUS_DMA_WAITOK);
NULL, ((xs->xs_control & XS_CTL_NOSLEEP) ?
BUS_DMA_NOWAIT : BUS_DMA_WAITOK) | BUS_DMA_STREAMING);
if (error) {
XS_SETERR(xs, HBA_BOTCH);
return (CMD_COMPLETE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: twe.c,v 1.12 2001/03/04 17:50:51 ad Exp $ */
/* $NetBSD: twe.c,v 1.13 2001/03/07 23:07:17 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -834,7 +834,7 @@ twe_ccb_map(struct twe_softc *sc, struct twe_ccb *ccb)
* Map the data buffer into bus space and build the S/G list.
*/
rv = bus_dmamap_load(sc->sc_dmat, ccb->ccb_dmamap_xfer, data,
ccb->ccb_datasize, NULL, BUS_DMA_NOWAIT);
ccb->ccb_datasize, NULL, BUS_DMA_NOWAIT | BUS_DMA_STREAMING);
if (rv != 0) {
if (ccb->ccb_abuf != (vaddr_t)0) {
s = splvm();