Source-Changes archive

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

CVS commit: src/sys/dev/usb



Module Name:    src
Committed By:   bouyer
Date:           Sat Jun 28 17:42:53 UTC 2008

Modified Files:
        src/sys/dev/usb: ehci.c ehcivar.h ohci.c ohcivar.h uhci.c uhcivar.h
            usb_mem.c usb_mem.h

Log Message:
Add appropriate bus_dmamap_sync() calls to uhci(4), ohci(4) and ehci(4),
as proposed on tech-kern@.
While all DMA memory used in the USB framework is mapped BUS_DMAMAP_COHERENT
(including data memory, which is memcpy'd from/to USB-private buffers),
the CPU can reorder loads or stores from/to main memory, causing the
controller to have an incoherent view of the DMA descriptors lists for a
short time. bus_dmamap_sync() should contain memory barriers that prevents
the CPU from reordering load/store. Note that BUS_DMAMAP_COHERENT is
still required for the DMA descriptor lists - these can't work properly
with software cache coherency.
This fixes "host controller process error/host controller halted" errors
I'm occasionally seeing with a umodem device on uhci on x86.
Thanks to Michael Lorenz for testing it on his O2, and Izumi Tsutsui on
his Cobalt Qube 2700.


To generate a diff of this commit:
cvs rdiff -r1.137 -r1.138 src/sys/dev/usb/ehci.c
cvs rdiff -r1.30 -r1.31 src/sys/dev/usb/ehcivar.h
cvs rdiff -r1.194 -r1.195 src/sys/dev/usb/ohci.c
cvs rdiff -r1.44 -r1.45 src/sys/dev/usb/ohcivar.h src/sys/dev/usb/uhcivar.h
cvs rdiff -r1.222 -r1.223 src/sys/dev/usb/uhci.c
cvs rdiff -r1.36 -r1.37 src/sys/dev/usb/usb_mem.c
cvs rdiff -r1.26 -r1.27 src/sys/dev/usb/usb_mem.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index