From owner-freebsd-hackers Mon Aug 18 21:00:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id VAA06987 for hackers-outgoing; Mon, 18 Aug 1997 21:00:11 -0700 (PDT) Received: from bunyip.cc.uq.edu.au (daemon@bunyip.cc.uq.edu.au [130.102.2.1]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id VAA06980 for ; Mon, 18 Aug 1997 21:00:03 -0700 (PDT) Received: (from daemon@localhost) by bunyip.cc.uq.edu.au (8.8.5/8.8.6) id NAA25715 for freebsd-hackers@freebsd.org; Tue, 19 Aug 1997 13:59:58 +1000 Received: from localhost.dtir.qld.gov.au by ogre.dtir.qld.gov.au (8.7.5/DEVETIR-E0.3a) with SMTP id OAA01354; Tue, 19 Aug 1997 14:00:48 +1000 (EST) Message-Id: <199708190400.OAA01354@ogre.dtir.qld.gov.au> To: freebsd-hackers@freebsd.org cc: syssgm@dtir.qld.gov.au Subject: Re: isa_dmastatus References: <199708190127.KAA15154@genesis.atrad.adelaide.edu.au> In-Reply-To: <199708190127.KAA15154@genesis.atrad.adelaide.edu.au> from Michael Smith at "Tue, 19 Aug 1997 01:27:59 +0000" Date: Tue, 19 Aug 1997 14:00:47 +1000 From: Stephen McKay Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Tuesday, 19th August 1997, Michael Smith wrote: >Amancio Hasty stands accused of saying: >> 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. > >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. To be more specific, this seems like the way to go for 2.2.5. For -current, we can be more flamboyant. >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 Looks like a good start. Can we please have more underscores? Like isa_dma_status? These look lopsided. >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.). Since the DMA channels are not shareable (please correct me if wrong), there seems no point in combining acquiring a channel with any other operation. Then there's not much point in having isa_dma_transact. I think we should continue directly using routines very much like we have now, but clear up the difficulties with concepts like bounce buffering and auto DMA by adding a few more routines, or at least some more flags. Stephen.