USB patch for better bus_dma and detachment support
Peter Weiss, Sun Microsystems, Germany
Peter.Weiss at Sun.com
Mon May 24 06:19:55 PDT 2004
>>>>> "Ian" == Ian Dowse <iedowse at maths.tcd.ie> writes:
Ian> In case anybody is interested in testing or helping with this, there's a
Ian> patch at
Ian> http://people.freebsd.org/~iedowse/usb.diff
Ian> that attempts to begin addressing a number of problems with our current
Ian> USB code:
Ian> o All data buffers were allocated using bus_dma as physically
Ian> contiguous memory. All transfers involve a memory copy to/from these
Ian> contiguous buffers, and the contiguous memory is never freed. Use of
Ian> these buffers is also inefficient, so low-memory systems tend to quickly
Ian> run out of usable physical memory.
Ian> o USB host controllers cannot be detached, so for example, unplugging a
Ian> cardbus USB device will cause a crash.
Ian> Neither of these issues is completely solved by the patch, but most I/O
Ian> now avoids the need for contiguous buffers by using bus_dmamap_load() on
Ian> the virtual buffer, and the system seems to survive the removal of a
Ian> cardbus OHCI/EHCI controller, though memory is probably leaked.
Ian> [...]
Yes, the patch works, but does not fix the hotplugging of my optical usb
mouse on my notebook. Unplugging is recognized, but no reaction seen if it's
plugged in again
Peter
--
Peter Weiss / Peter.Weiss at germany.sun.com
Sun Microsystems GmbH / Sonnenallee 1, D-85551 Kirchheim-Heimstetten
(+49 89) 46008 2947 / mobil 0177/ 60 40 121
More information about the freebsd-current
mailing list