Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Mar 2020 13:46:26 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 204521] [new driver] [request] Port rtsx from OpenBSD to FreeBSD
Message-ID:  <bug-204521-227-BinQW4jX0o@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-204521-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-204521-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D204521

--- Comment #41 from Gary Jennejohn <gljennjohn@gmail.com> ---
(In reply to dirkx from comment #40)
The code is correct.  The {Net,Open}BSD upper layer code always sets xfer_l=
en
to the correct value.  FreeBSD does indeed have xfer_len, but the upper lay=
er
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.=
=20
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=
.=20
There is an upper layer which implements the SD Card Host Controller
Specification.  It is somewhat different than what was implemented in FreeB=
SD.=20
I'm beginning to suspect that these differences may be contributing to the =
DMA
problems.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-204521-227-BinQW4jX0o>