From owner-freebsd-multimedia Sat Aug 30 12:37:44 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA29777 for multimedia-outgoing; Sat, 30 Aug 1997 12:37:44 -0700 (PDT) Received: from rah.star-gate.com (rah.star-gate.com [204.188.121.18]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA29771 for ; Sat, 30 Aug 1997 12:37:41 -0700 (PDT) Received: from rah.star-gate.com (localhost.star-gate.com [127.0.0.1]) by rah.star-gate.com (8.8.7/8.8.5) with ESMTP id MAA07420; Sat, 30 Aug 1997 12:37:31 -0700 (PDT) Message-Id: <199708301937.MAA07420@rah.star-gate.com> X-Mailer: exmh version 2.0gamma 1/27/96 To: Johan Larsson cc: multimedia@freebsd.org Subject: Re: Xquake, still no luck. In-reply-to: Your message of "Sat, 30 Aug 1997 18:05:27 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 30 Aug 1997 12:37:31 -0700 From: Amancio Hasty Sender: owner-freebsd-multimedia@freebsd.org X-Loop: FreeBSD.org Precedence: bulk About isa.c , a static variable dma_auto_mode was added: static u_int8_t dma_auto_mode = 0; --- */ int isa_dma_acquire(chan) int chan; { #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) panic("isa_dma_acquire: channel out of range"); #endif if (dma_inuse & (1 << chan)) { printf("isa_dma_acquire: channel %d already in use\n", chan); return (EBUSY); } dma_inuse |= (1 << chan); dma_auto_mode &= ~(1 << chan); ^^^^^^^^^^^^^^^^^^^^^ clear auto dma state for channel ---- void isa_dma_release(chan) int chan; { #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) panic("isa_dma_release: channel out of range"); if ((dma_inuse & (1 << chan)) == 0) printf("isa_dma_release: channel %d not in use\n", chan); #endif if (dma_busy & (1 << chan)) { dma_busy &= ~(1 << chan); /* * XXX We should also do "dma_bounced &= (1 << chan);" * because we are acting on behalf of isa_dmadone() which * was not called to end the last DMA operation. This does * not matter now, but it may in the future. */ } dma_inuse &= ~(1 << chan); dma_auto_mode &= ~(1 << chan); ^^^^^^^^^^^^^^^^^^^^^ clear auto dma state for channel ---- void isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan) { vm_offset_t phys; int waport; caddr_t newaddr; #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) panic("isa_dmastart: channel out of range"); if ((chan < 4 && nbytes > (1<<16)) || (chan >= 4 && (nbytes > (1<<17) || (u_int)addr & 1))) panic("isa_dmastart: impossible request"); if ((dma_inuse & (1 << chan)) == 0) printf("isa_dmastart: channel %d not acquired\n", chan); #endif #if 0 /* * XXX This should be checked, but drivers like ad1848 only call * isa_dmastart() once because they use Auto DMA mode. If we * leave this in, drivers that do this will print this continuously. */ if (dma_busy & (1 << chan)) printf("isa_dmastart: channel %d busy\n", chan); #endif dma_busy |= (1 << chan); if (isa_dmarangecheck(addr, nbytes, chan)) { if (dma_bouncebuf[chan] == NULL || dma_bouncebufsize[chan] < nbytes) panic("isa_dmastart: bad bounce buffer"); dma_bounced |= (1 << chan); newaddr = dma_bouncebuf[chan]; /* copy bounce buffer on write */ if (!(flags & B_READ)) bcopy(addr, newaddr, nbytes); addr = newaddr; } /* translate to physical */ phys = pmap_extract(pmap_kernel(), (vm_offset_t)addr); if (flags & B_RAW) { dma_auto_mode |= (1 << chan); } else { dma_auto_mode &= ~(1 << chan); } ^^^^^^^^^^^^^^^^^^ set the auto dma flag if R_RAW is set otherwise we are not using auto dma mode void isa_dmadone(int flags, caddr_t addr, int nbytes, int chan) { #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) panic("isa_dmadone: channel out of range"); if ((dma_inuse & (1 << chan)) == 0) printf("isa_dmadone: channel %d not acquired\n", chan); #endif if (((dma_busy & (1 << chan)) == 0) && (dma_auto_mode & (1 << chan)) == 0 ) printf("isa_dmadone: channel %d not busy\n", chan); ^^^^^^^^^^^^^^^^^^^^^^^ don't print silly printf if we using auto dma ^^^^^^ ---- int isa_dmastatus(int chan) { u_long cnt = 0; int ffport, waport; u_long low1, high1, low2, high2; u_long ef; /* channel active? */ if ((dma_inuse & (1 << chan)) == 0) { printf("isa_dmastatus: channel %d not active\n", chan); return(-1); } /* channel busy? */ if (((dma_busy & (1 << chan)) == 0) && (dma_auto_mode & (1 << chan)) == 0 ) { printf("chan %d not busy\n", chan); return -2 ; } ^^^^^^^^^^^^^^^ don't return if we are in auto dma mode ^^^^^^^^^^^^^^^^^^^^^ ------ int isa_dmastop(int chan) { if (dma_inuse & (1 << chan) == 0) printf("isa_dmastop: channel %d not acquired\n", chan); if (((dma_busy & (1 << chan)) == 0) && (dma_auto_mode & (1 << chan)) == 0 ) { printf("chan %d not busy\n", chan); return -2 ; } ^^^^^^^^^^^^^^^ don't return if we are in auto dma mode ^^^^^^^^^^^^^^^^^^^^^ Hope this helps, Amancio >From The Desk Of Johan Larsson : > On Fri, 29 Aug 1997, Amancio Hasty wrote: > > > okay, > > leave /etc/host.conf there and mail me your /compat/linux/etc/host.conf > > Don't bother about this problem nomore.. It was "my" fault. Of some reason > that i don't know of, about /etc/hosts was messed up. > > Thanks for anything, now it's just the "isa_dmastatus: channel 5 not > active" problem i gotta to solve. :-) > > Johan > -- > * mailto:gozer@ludd.luth.se * http://www.ludd.luth.se/users/gozer/ * > * finger gozer@mother.ludd.luth.se for more information... +-+-+-+ * > * Powered by FreeBSD. http://www.se.freebsd.org/ +-+-+-+-+-+-+-+-+ * >