On 06/09/2019 05:22, Josh Dersch via cctalk wrote:
What I do not understand is (a) why such purges are
necessary, and (b) how
the MSCP controller knows when one should occur. The Port Description doc
hints that it has to do with repeated access to a given area of memory.
The DW780 documentation hints that it needs to happen after *any* block
transfer. (See pg. 2-58 of the document linked above.)
I think point 3 and 4 on page 2-59 are critical here. The memory
accesses via the buffered data path must be to consecutive increasing
addresses. If a non-consecutive access is required (transfer restart,
compare etc) then the data path must be purged first. In the case of a
write this will flush any residual bytes to memory and for a read it
will ensure that fresh data is loaded to the buffer on the next access.
At least that's my interpretation from reading 2.6.2.2
I'm not sure if the adapter needs to request the purge at the end of
each block transfer. The driver may do this anyway but I'll have to
check the source listings.
Matt