Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 May 2004 15:18:53 +0200
From:      Peter.Weiss@Sun.com (Peter Weiss, Sun Microsystems, Germany)
To:        Ian Dowse <iedowse@maths.tcd.ie>
Cc:        current@freebsd.org
Subject:   Re: USB patch for better bus_dma and detachment support
Message-ID:  <xpxyu0y6j742.fsf@Sun.com>
In-Reply-To: <200405232109.aa46210@salmon.maths.tcd.ie> (Ian Dowse's message of "Sun, 23 May 2004 21:09:01 %2B0100")
References:  <200405232109.aa46210@salmon.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "Ian" == Ian Dowse <iedowse@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@germany.sun.com
Sun Microsystems GmbH     / Sonnenallee 1, D-85551 Kirchheim-Heimstetten
(+49 89) 46008 2947       / mobil 0177/ 60 40 121



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xpxyu0y6j742.fsf>