PXA168 + 88W8686 SDIO interrupt troubles
Doug Brown
doug at schmorgal.com
Fri Jun 10 23:12:02 PDT 2022
Well, I got it working well enough that I'm satisfied!
On 6/9/2022 2:49 PM, Doug Brown wrote:
> 2) The sd8xxx driver's IRQ handler increments a counter and wakes the
> main thread to do the work, so the SDHC host controller's interrupt
> gets unmasked quickly, whereas libertas does more handling in the IRQ
> handler before returning and allowing the interrupt to be unmasked.
Hacking the libertas driver to acknowledge the interrupt in the host
controller immediately after clearing the 88W8686's interrupt register
definitely helped, but I still ran into missing interrupts when there
was a lot of activity, like downloading a big file.
After lots of experimentation, I also changed the libertas driver to
re-read the interrupt status register from the 88W8686 after re-enabling
the interrupts in the host controller. That caused it to stop missing
interrupts, which makes no sense, but it fixed it. If I take the line
out again, the missing interrupts come back. I don't understand it, and
it's a super hacky approach, but it works. I'm pretty sure I'm hitting
weird behavior in the PXA168's SDHC/SDIO implementation that I will
never be able to fix the "correct" way without some internal guidance
from Marvell, which likely isn't going to happen as a hobbyist. Oh well!
I'm happy!
> maybe I should try the libertas driver on 2.6.28!
I decided to try that and sure enough, the libertas driver has the same
issue on 2.6.28. So it's nothing special about kernel 2.6.28. Something
about Marvell's vendor driver just plays nicer on the PXA168. It's also
2 to 3 times faster than the libertas driver for me. It's fine though,
I'm just happy I got libertas working on kernel 5.15 at all. I also had
to tweak wpa_supplicant because newer versions of it don't play nicely
with libertas. I posted about that issue on the hostap mailing list.
More information about the libertas-dev
mailing list