by support »
Hello,
First some shameless self-promotion: Have you considered Xillybus' IP core? It doesn't fit all scenarios, but if it does, it will solve you some work...
Now to your question: There's nothing inherently wrong with a virtual address that happens to be the same as the physical one. On many platforms, this is the default behavior. There's no reason to suspect that pci_map_single() didn't work correctly. On almost all platforms, it's a can't-fail function, that just calculates the physical address from the virtual one, which is often just an offset. Which can be zero.
So I don't share your conclusion that the problem is necessarily with the driver. The packet could be malformed, even if it appears to be OK. Another issue I would look at is cache synchronization. If your platform is x86-based, this will not pose a problem, but many other architectures, in particular ARM, require a proper cache invalidation, or you may read rubbish even though the data has arrived on the DDR memory.
Hope this helps.
Eli
Hello,
First some shameless self-promotion: Have you considered Xillybus' IP core? It doesn't fit all scenarios, but if it does, it will solve you some work...
Now to your question: There's nothing inherently wrong with a virtual address that happens to be the same as the physical one. On many platforms, this is the default behavior. There's no reason to suspect that pci_map_single() didn't work correctly. On almost all platforms, it's a can't-fail function, that just calculates the physical address from the virtual one, which is often just an offset. Which can be zero.
So I don't share your conclusion that the problem is necessarily with the driver. The packet could be malformed, even if it appears to be OK. Another issue I would look at is cache synchronization. If your platform is x86-based, this will not pose a problem, but many other architectures, in particular ARM, require a proper cache invalidation, or you may read rubbish even though the data has arrived on the DDR memory.
Hope this helps.
Eli