Re: [Sdhci-devel] Ricoh R5C822 and QUIRK_FORCE_DMA

From: Garrett D'Amore
Date: Wed May 13 2009 - 14:09:51 EST


I know that we've run into some bizarre behavior with Ricoh controllers and DMA in the Solaris implementation of sdhost. Specifically, what we ran into was problems with DMA across certain alignment boundaries. It seems that when a DMA operation is not aligned on a 512 boundary, or does something less than a 512 byte transfer, it has trouble.

In the Solaris driver, I just allocate a big 64k page-aligned chunk for DMA, and use bcopy to/from that. Frankly, bcopy is fast enough, that it makes little performance difference. Plus, it means that I can use a larger interrupt threshold than 4K, allowing me to skip the scatter/gather overhead... I suspect that this negates the cost of the bcopy.

After doing this, the Lenovo and Toshiba laptops that I've had access to work well.

- Garrett

Pierre Ossman wrote:
(cc:ing sdhci-devel)

On Fri, 1 May 2009 00:45:24 +0200
Tobias Diedrich <ranma+kernel@xxxxxxxxxxxx> wrote:

Do you know any controller bugs for this revision which may be the
reason for not advertising DMA capability?
I haven't done any big tests yet, but at first glance it seems to
read/write the card just fine.


Might be a system problem so it's Lenovo that disabled it. You're the
first report I've seen on this since the DMA logic was reworked so that
DMA didn't have to be forced for most cases.

Is there anyone else reading this that are having DMA problems?

Rgds
------------------------------------------------------------------------

_______________________________________________
sdhci-devel mailing list
sdhci-devel@xxxxxxxxxxxxxxx
http://list.drzeus.cx/mailman/listinfo/sdhci-devel

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/