Skip to contentSkip to conversation

ISA DMA

DISCUSSION Pierre Ossman 3 participants 4 messages Sep 8, 2004 – Sep 9, 2004

lore
Share & tools
lore
#0 lore raw

I'm trying to figure out how to do ISA DMA transfers. I can't figure out
how to satisfy all the requirements the ISA DMA controller sets. I've
set a DMA mask of 0x00ffffff but mappings end up above the 16MB limit nonetheless. And I have no idea how to keep transfers within the same 64k boundary.

I've been trying to figure out how other drivers do it but I can't see what I'm missing. And the documentation doesn't cover ISA DMA.

I'm basically stuck now so I'd appreciate any tips you can give me.

Rgds
Pierre Ossman

#1 lore raw

Uttered Pierre Ossman <[email protected]>, spake thus:

Quoted 2 lines

I've been trying to figure out how other drivers do it but I can't see what I'm missing. And the documentation doesn't cover ISA DMA.

Allocate your DMA buffer area by OR'ing in the "GFP_DMA" flag. This keeps your DMA buffer below the magical 16MB limit. Also be sure to use "virt_to_bus()" to convert the kernel buffer address into one that you can give to the DMA engine.

HTH.

#2 lore raw
In reply to Pierre Ossman
Quoted 5 lines · Pierre Ossman

I'm trying to figure out how to do ISA DMA transfers. I can't figure out
how to satisfy all the requirements the ISA DMA controller sets. I've
set a DMA mask of 0x00ffffff but mappings end up above the 16MB limit nonetheless. And I have no idea how to keep transfers within the same 64k boundary.

drivers/net/lance.c is a pretty good worked example of driving the old ISA bus grunge.

#3 lore raw
Quoted 5 lines · Alan Cox

drivers/net/lance.c is a pretty good worked example of driving the old ISA bus grunge.

Thanks. That helped solve some of the problems at least. The transfers still only work some of the time. Everything seems ok but only junk in the buffers. Not sure which part is causing it so it'll require some more research.

Rgds
Pierre