Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Aug 1997 10:57:59 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        hasty@rah.star-gate.com (Amancio Hasty)
Cc:        luigi@labinfo.iet.unipi.it, smp@csn.net, multimedia@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: isa_dmastatus
Message-ID:  <199708190127.KAA15154@genesis.atrad.adelaide.edu.au>
In-Reply-To: <199708180723.AAA00439@rah.star-gate.com> from Amancio Hasty at "Aug 18, 97 00:23:44 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Amancio Hasty stands accused of saying:
> 
> When we get a dma interrupt from the device, if I call isa_dmadone to
> clear the busy flag it does not mean that I am  done using the
> buffer and I can't call isa_dmastart because the dma processes
> is still active. 

OK.

> So if we wish to support auto dma and use the existing dma interface
> in isa.c then I suggest that we add a simple check in the isa 
> dma routine to bypass the busy flag check when we are using 
> auto dma. What does this mean in an SMP environment I have no 
> idea because when a driver requests auto dma in essence he is 
> requesting exclusive access of the dma channel.

It sounds like you're just adding hairs to an existing wart.  This may
well be the most expedient way to go in the short term though.

> Please let me know if my explanation is not clear and if there
> are any intentions to support auto dma in the isa.c / *dma* routines.

It sounds to me as though there is a need for a couple of different
levels of access to the DMA support.  At the bottom, we need some
primitives :

isa_dmaacquire		- obtain a DMA channel
isa_dmarelease		- release a DMA channel
isa_dmastart		- start a DMA transfer
isa_dmastop		- stop a DMA transfer
isa_dmastatus		- query DMA status

which provide hands-on access to the DMA hardware.  Above these, it seems
that DMA consumers would benefit from 

isa_dmatransact		- start one-shot DMA transaction
isa_dmatransstatus	- query/complete DMA transaction

where the first would take assorted parameters (address, port, direction,
channel etc.), and then use the primitives to obtain the channel and start
the transaction, and the second would allow for polling the status of a
DMA transaction (instead of sleeping for it to finish, etg.).

For auto-DMA operation, you would acquire the DMA channel, and then
use the other isa_dma* functions until done, at which point you would
release the channel again.  It seems to me that this is the critical
point; the current mixing of the acquire/release with the start/done
functionality is breaking your use of auto DMA, correct?

-- 
]] Mike Smith, Software Engineer        msmith@gsoft.com.au             [[
]] Genesis Software                     genesis@gsoft.com.au            [[
]] High-speed data acquisition and      (GSM mobile)     0411-222-496   [[
]] realtime instrument control.         (ph)          +61-8-8267-3493   [[
]] Unix hardware collector.             "Where are your PEZ?" The Tick  [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708190127.KAA15154>