Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Aug 1997 20:20:34 +1000
From:      Stephen McKay <syssgm@dtir.qld.gov.au>
To:        freebsd-current@freebsd.org
Cc:        syssgm@dtir.qld.gov.au
Subject:   Re: isa.c:isa_dmastatus(int chan) 
Message-ID:  <199708151020.UAA02923@ogre.dtir.qld.gov.au>
In-Reply-To: <199708150510.WAA00321@rah.star-gate.com> from Amancio Hasty at "Fri, 15 Aug 1997 05:10:29 %2B0000"
References:  <199708150510.WAA00321@rah.star-gate.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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?199708151020.UAA02923>