Constants and kmallocs passed to DMA engine

Marc SCHAEFER (schaefer@alphanet.ch)
Thu, 16 Apr 1998 09:32:45 +0200


Hi,

in a device driver, I have declared:
static const unsigned char buffer[] = { 'a', 'b', 'c', 'd' };

If I pass virt_to_bus(buffer) to a PCI DMA, I get garbage. If
I kmalloc() and memcpy() the const buffer to that kmalloc()ed
memory, and pass do virt_to_bus(kmalloced_memory) to the PCI
DMA, it works like a charm (ix86 architecture).

Did I miss something somewhere ? What is the macro for
constants -> DMA ?

NB: that's a DMA outgoing operation of course, I am not
erasing the constant buffer.

thank you for any information on this.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu