diff options
author | dg <dg@FreeBSD.org> | 1994-12-11 01:45:41 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-12-11 01:45:41 +0000 |
commit | f89e56828a09049d58f2bbd0c39ddf60e51e659c (patch) | |
tree | ae9ae8a82cceb060fc3f3c32ed83f00a6746e5d4 /sys/dev/de | |
parent | 28753770396ee59b0cb97820b8f360421fe64eed (diff) | |
download | FreeBSD-src-f89e56828a09049d58f2bbd0c39ddf60e51e659c.zip FreeBSD-src-f89e56828a09049d58f2bbd0c39ddf60e51e659c.tar.gz |
The physical memory allocated for input DMA must be contiguous. The driver
worked in the past only because of good fortune. Anyway, use the contig alloc
routine I wrote awhile ago (vm_page_alloc_contig) for the sound code to do
this allocation. Also, specify read+write on the permissions to pmap_enter().
Specifying just read can have unexpected consquences.
Diffstat (limited to 'sys/dev/de')
-rw-r--r-- | sys/dev/de/if_de.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index d8c2038..60a8de8 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_de.c,v 1.8 1994/11/24 14:29:34 davidg Exp $ + * $Id: if_de.c,v 1.9 1994/11/30 12:08:23 davidg Exp $ * */ @@ -1109,7 +1109,7 @@ tulip_pci_attach( } bzero(sc, sizeof(sc)); /* Zero out the softc*/ - sc->tulip_rxspace = kmem_alloc(kernel_map, TULIP_RXSPACE + NBPG); + sc->tulip_rxspace = vm_page_alloc_contig(TULIP_RXSPACE + NBPG, 0, 0xffffffff, PAGE_SIZE); /* * We've allocated an extra page of receive space so we can double map * the first page of the receive space into the page after the last page @@ -1118,7 +1118,7 @@ tulip_pci_attach( * that greatly simplifies the recevie logic. */ pmap_enter(pmap_kernel(), sc->tulip_rxspace + TULIP_RXSPACE, - vtophys(sc->tulip_rxspace), VM_PROT_READ, TRUE); + vtophys(sc->tulip_rxspace), VM_PROT_READ|VM_PROT_WRITE, TRUE); sc->tulip_unit = unit; sc->tulip_name = "de"; |