mm and DMA devices

Jens David (dg1kjd@afthd.tu-darmstadt.de)
Mon, 18 Oct 1999 13:05:09 +0200


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.
I can allocate buffers using kmalloc() and alloc_skb() and translate
the addresses to bus addresses using virt_to_bus() (shouldn´t we
call this virt_to_pci()?) and bus_to_virt() vice versa cleanly,
but the position of the buffers do not seem to stay constant (this was
really a hard one to figure out!). Now what is going on here? Are
we defragmenting physical address space? If so, can we really
consider this to be the RightThing (TM) for kernel memory? Of cause,
I can allocate GFP_DMA memory which seems to be safe, but I have still
two problems with this:

1.) I will use up "expensive" below-16MB-memory which ought to be
kept for ISA-DMA applications.
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.

Comments?

-- Jens

-
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/