Subject: Re: "esp" driver reorg proposal
To: None <>
From: Gordon W. Ross <>
List: tech-kern
Date: 01/26/1997 00:33:54
> From:
> Date: Sun, 26 Jan 1997 00:27:45 -0500 (EST)

[ Mac needs two "flavors"; DMA and non-DMA ]

> > Why can't this be done via the existing DMA hooks?
> > 
> > On machines that do DMA, the DMA hooks would start DMA.  On machines
> > which don't, the DMA hooks would just do the trasnfers...
> If you look at the code, that's what I do.  I think that there were a
> couple of changes that I had to make, though, in order to get it right
> and minimally responsive (MacOS drivers still out-perform it by a factor
> of about 4).  I tried, though, to keep the changes to a minimum.
> Basically, I wanted to point out that the framework chosen should
> support attaching devices with two different sets of hooks as well
> as handling attachment of two devices with the same sets of hooks (with
> a different register offset or private data of some sort).
> -allen

All the dma functions are called with sc->sc_dma as an argument.
Those can dispatch if needed, or you can have your attach code
set sc->sc_dma to one of a number of alternative dma drivers
(as the sparc code does now).