tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bus_dmamap_sync() for uhci(4)

Hash: SHA1


On Jun 9, 2008, at 17:26, Manuel Bouyer wrote:

On Mon, Jun 09, 2008 at 05:15:23PM -0400, Michael Lorenz wrote:

On Jun 9, 2008, at 16:16, Manuel Bouyer wrote:

On Mon, Jun 09, 2008 at 03:43:05PM -0400, Michael Lorenz wrote:
I just did that. Now the kernel doesn't find /any/ USB devices
except the root hubs. It can't really be a problem with crime
interrupts - ehci finds devices and other cards that used interrupt
10 worked before so at least one of the uhcis should work.

Hmm, an old, unpatched kernel does find devices at uhci.

thanks. That's strange: if I read things properly, all the memory used
by uhci or ehci should be mapped uncached (use of BUS_DMA_COHERENT),
so the _sync operations I added should just issue wmb() instructions,
nothing more.

The O2 doesn't have any kind of DMA coherency support IIRC. The only
other card I tried in this machine is an ex which Just Worked(tm). So
do the onboard ahc's.

what do you mean ? bus_dmamap_sync() isn't a NOP, and for cached memory
it has to invalidate or flush the cache.

I meant just that ;)

BTW, I suspect the lack of memory read/write barrier are the cause of
the issues I'm seeing on x86 too (this is why I started this work).

Hmm, I need to read sgimips' bus_dma stuff again but since other
drivers work it can't be all that borked.

Sure it was not my point. It's most probably an issue with the
_sync() calls I added. But as the memory referred to by these calls should be mapped uncached anyway, I don't understand how they could make a difference.

Something's weird here - I added the KASSERT you asked for, didn't add ehci back but the kernel found the USB disk this time. It did hang while probing a low speed device though ( sat there for a minute or so ), when I unplugged it the machine booted normally and so far bonnie's been working for about 10 minutes without any trouble. For some reason it took a lot longer than on my other machines to find the USB disk ( ~15 seconds vs. less than one )

have fun

Version: GnuPG v1.4.7 (Darwin)


Home | Main Index | Thread Index | Old Index