From owner-freebsd-current Fri Aug 15 09:38:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA05322 for current-outgoing; Fri, 15 Aug 1997 09:38:11 -0700 (PDT) Received: from rah.star-gate.com (rah.star-gate.com [204.188.121.18]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA05317 for ; Fri, 15 Aug 1997 09:38:07 -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 JAA01391; Fri, 15 Aug 1997 09:37:18 -0700 (PDT) Message-Id: <199708151637.JAA01391@rah.star-gate.com> X-Mailer: exmh version 2.0gamma 1/27/96 To: Stephen McKay cc: freebsd-current@FreeBSD.ORG Subject: Re: isa.c:isa_dmastatus(int chan) In-reply-to: Your message of "Fri, 15 Aug 1997 20:20:34 +1000." <199708151020.UAA02923@ogre.dtir.qld.gov.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 15 Aug 1997 09:37:18 -0700 From: Amancio Hasty Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk For now , I am just going to duplicate isa_dmastatus in the sound driver. I can call isa_dma_acquire however that leaves me wide open for the second condition . Tnks, Amancio >From The Desk Of Stephen McKay : > On Friday, 15th August 1997, Amancio Hasty wrote: > > >Can someone delete the enclosed data from isa_dmastatus? > > > > > >isa_dmastatus(int chan) > >{ > > u_long cnt = 0; > > int ffport, waport; > > u_long low1, high1, low2, high2; > > u_long ef; > >/* delete this block of code */ > > /* channel active? */ > > if ((dma_inuse & (1 << chan)) == 0) { > > printf("isa_dmastatus: channel %d not active\n", chan); > > return(-1); > > } > > > > /* still busy? */ > > if ((dma_busy & (1 << chan)) == 0) { > > return(0); > > } > > > >/* end of delete block */ > > Calling isa_dma_acquire() first will satisfy the first condition, and I > think it makes sense to do so. The second condition is trickier, and > whether or not it should be deleted depends on what you mean by "busy". > Once the channel is in cascade mode, you can think of it as busy. So, > in that case, you would add "dma_busy |= 1 << chan" to isa_dmacascade(). > You might have other opinions of cascade mode, then the fix is different. > > >isa_dmastatus is really meant for the sound driver and we are using > >in auto dma mode. > > But it should work for everything. Although this routine has been debated > already, it still needs some improvement. > > Stephen.