Re: mm and DMA devices

Matti Aarnio (matti.aarnio@sonera.fi)
Mon, 18 Oct 1999 15:31:26 +0300


On Mon, Oct 18, 1999 at 01:05:09PM +0200, Jens David wrote:
> Greetings.
>
> I am the developer of a new medium speed PCI SCC card for
> HDLC use (ham radio that is). The chip I use (Siemens/Infineon
> DSCC-4) features busmaster DMA for transfer of data from/to
> host memory. I am having some problems with buffer handling here.

You should look at any of PCI bus-master Ethernet cards,
which have exactly the same problemset.
...
> 1.) I will use up "expensive" below-16MB-memory which ought to be
> kept for ISA-DMA applications.

Perhaps you want 'GFP_DMA32' allocations ?
And if the buffer isn't in appropriate area, non-irq-space
part of your driver must copy things over into appropriate
area for transmit.

Such allocation space does not exist, though...

Do you *really* have more than 1 or 2 GB RAM at your box ?

> 2.) When asked by the network subsystem to transmit a buffer I can
> not choose the kind of memory the data is provided in. I can only
> either copy it around or take the risk it will be pulled away
> under my feet.

No, data waiting for transmit won't be pulled away before
your driver gives a permission for it. You are implying
of giving that permission too early..

> Comments?
> -- Jens

/Matti Aarnio <matti.aarnio@sonera.fi> oh2mqk

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/