Re: USB patch for better bus_dma and detachment support

From: Peter Weiss, Sun Microsystems, Germany <Peter.Weiss_at_Sun.com>
Date: Mon, 24 May 2004 15:18:53 +0200
>>>>> "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
Received on Mon May 24 2004 - 04:19:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:54 UTC