diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2001-08-02 11:16:30 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2001-08-02 11:16:30 +0000 |
commit | 5220f51bff31db04550a33a540e729eca1573a9b (patch) | |
tree | db694bce47cf230c24318972e72f9112a1c42c20 /sys/dev/pci/maestro.c | |
parent | d45c3d6c15452ab0241db34ed5819e5b1748d142 (diff) |
fix mmap.
Add workaround for uvm brain-deadness (allow open O_RDWR, which is
necessary for mmap to work, since mmap(PROT_WRITE) does NOT work on
devices)
Diffstat (limited to 'sys/dev/pci/maestro.c')
-rw-r--r-- | sys/dev/pci/maestro.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c index b95df9e57a9..4d3438a024c 100644 --- a/sys/dev/pci/maestro.c +++ b/sys/dev/pci/maestro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: maestro.c,v 1.7 2001/06/12 15:40:32 niklas Exp $ */ +/* $OpenBSD: maestro.c,v 1.8 2001/08/02 11:16:29 espie Exp $ */ /* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */ /* * FreeBSD's ESS Agogo/Maestro driver @@ -613,7 +613,7 @@ maestro_mappage(self, mem, off, prot) if (off < 0) return -1; return bus_dmamem_mmap(sc->dmat, &sc->dmaseg, 1, - (caddr_t)mem - sc->dmabase + off, prot, BUS_DMA_WAITOK); + off, prot, BUS_DMA_WAITOK); } int @@ -826,8 +826,11 @@ maestro_open(hdl, flags) struct maestro_softc *sc = (struct maestro_softc *)hdl; DPRINTF(("%s: open(%d)\n", sc->dev.dv_xname, flags)); +/* XXX work around VM brokeness */ +#if 0 if ((OFLAGS(flags) & O_ACCMODE) != O_WRONLY) return (EINVAL); +#endif sc->play.mode = MAESTRO_PLAY; sc->record.mode = 0; #ifdef AUDIO_DEBUG |