Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Hint BUS_DMA_READ and BUS_DMA_WRITE.
details: https://anonhg.NetBSD.org/src/rev/2fe04b6ced71
branches: trunk
changeset: 512946:2fe04b6ced71
user: kleink <kleink%NetBSD.org@localhost>
date: Thu Jul 19 17:47:18 2001 +0000
description:
Hint BUS_DMA_READ and BUS_DMA_WRITE.
diffstat:
sys/dev/pci/sv.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (50 lines):
diff -r 49cc4ed65448 -r 2fe04b6ced71 sys/dev/pci/sv.c
--- a/sys/dev/pci/sv.c Thu Jul 19 17:19:40 2001 +0000
+++ b/sys/dev/pci/sv.c Thu Jul 19 17:47:18 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sv.c,v 1.12 2000/12/28 22:59:15 sommerfeld Exp $ */
+/* $NetBSD: sv.c,v 1.13 2001/07/19 17:47:18 kleink Exp $ */
/* $OpenBSD: sv.c,v 1.2 1998/07/13 01:50:15 csapuntz Exp $ */
/*
@@ -130,7 +130,7 @@
#define ARRAY_SIZE(foo) ((sizeof(foo)) / sizeof(foo[0]))
-int sv_allocmem __P((struct sv_softc *, size_t, size_t, struct sv_dma *));
+int sv_allocmem __P((struct sv_softc *, size_t, size_t, int, struct sv_dma *));
int sv_freemem __P((struct sv_softc *, struct sv_dma *));
int sv_open __P((void *, int));
@@ -508,10 +508,11 @@
}
int
-sv_allocmem(sc, size, align, p)
+sv_allocmem(sc, size, align, direction, p)
struct sv_softc *sc;
size_t size;
size_t align;
+ int direction;
struct sv_dma *p;
{
int error;
@@ -534,7 +535,8 @@
goto unmap;
error = bus_dmamap_load(sc->sc_dmatag, p->map, p->addr, p->size, NULL,
- BUS_DMA_NOWAIT);
+ BUS_DMA_NOWAIT |
+ (direction == AUMODE_RECORD) ? BUS_DMA_READ : BUS_DMA_WRITE);
if (error)
goto destroy;
DPRINTF(("sv_allocmem: pa=%lx va=%lx pba=%lx\n",
@@ -1441,7 +1443,7 @@
p = malloc(sizeof(*p), pool, flags);
if (!p)
return (0);
- error = sv_allocmem(sc, size, 16, p);
+ error = sv_allocmem(sc, size, 16, direction, p);
if (error) {
free(p, pool);
return (0);
Home |
Main Index |
Thread Index |
Old Index