PCI Memory mapping

linas at austin.ibm.com linas at austin.ibm.com
Thu Mar 25 04:08:14 EST 2004

On Wed, Mar 24, 2004 at 03:25:24PM +0100, Marc Leeman wrote:
> The strange thing is that this works only and only if I do a transfer
> back from kernel space into the userbuffer AFTER the DSP has
> acknowledged transferring the data. Note that this data is never used
> again. Doing this copy_to_user before DSP acknowledgement still results
> in the afore mentioned data corruption.

Excuse my total ignorance on this topic, but ... is it possible that the
DSP is using some sort of oddball bookmark mechanism to read the data?
This would be a rather poor design decision on the part of whomever
wrote the DSP code, but not out of the realms of impossible.  (I've
seen equally bizarre code in the past whose only excuse for existance
was stupidity.)  It could also be a bug in the DSP code.  The fact that
'everything is OK after DSP acks' is telling: in the end, the DSP *did*
do the right thing, by the time it ack'ed even if it did something weird
while data was flying around.


p.s. I did not read your code to see if it made sense, nor do I know
the ppc dma code.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

More information about the Linuxppc-dev mailing list