Date: Fri, 15 Aug 1997 09:37:18 -0700 From: Amancio Hasty <hasty@rah.star-gate.com> To: Stephen McKay <syssgm@dtir.qld.gov.au> Cc: freebsd-current@FreeBSD.ORG Subject: Re: isa.c:isa_dmastatus(int chan) Message-ID: <199708151637.JAA01391@rah.star-gate.com> In-Reply-To: Your message of "Fri, 15 Aug 1997 20:20:34 %2B1000." <199708151020.UAA02923@ogre.dtir.qld.gov.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708151637.JAA01391>
