https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204521

--- Comment #41 from Gary Jennejohn <[email protected]> ---
(In reply to dirkx from comment #40)
The code is correct.  The {Net,Open}BSD upper layer code always sets xfer_len
to the correct value.  FreeBSD does indeed have xfer_len, but the upper layer
never sets it.  To simplify implementing the OpenBSD code (and avoid kernel
panics) it was convenient for hlh to set xfer_len to a reasonable value.
I must admit that what's on github looks nothing like the code I've tested. 
I've made massive changes to DMA code, added lots of variations on how
transfers are done based on examining what OpneBSD and Linux do in various
situations and added large amounts of debugging.  Unfortunately, nothing I've
tried so far results in successful DMA transfers.
One test I did was to set a byte pattern in the virtual address of the DMA
buffer, start the transfer (the controller claims that no errors occurred), and
then dump the physical address of the buffer using /dev/mem.  The result was
that NO bytes were transferred at all, i.e. the contents of the virtual and
physical addresses were identical.
There is much more to the {Net,Open}BSD implementation than just the driver. 
There is an upper layer which implements the SD Card Host Controller
Specification.  It is somewhat different than what was implemented in FreeBSD. 
I'm beginning to suspect that these differences may be contributing to the DMA
problems.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to