Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 May 2004 09:00:38 +0900
From:      Rob <stopspam@users.sourceforge.net>
To:        freebsd-stable@freebsd.org, iedowse@maths.tcd.ie
Subject:   Re: USB patch for better bus_dma and detachment support
Message-ID:  <40B13B26.10201@users.sourceforge.net>
In-Reply-To: <200405232109.aa46210@salmon.maths.tcd.ie>
References:  <200405232109.aa46210@salmon.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help
Ian Dowse wrote:
> In case anybody is interested in testing or helping with this,
> there's a patch at
> 
> 	http://people.freebsd.org/~iedowse/usb.diff
> 
> that attempts to begin addressing a number of problems with our
> current USB code:
> 
>  o All data buffers were allocated using bus_dma as physically
>    contiguous memory. All transfers involve a memory copy to/from
>    these contiguous buffers, and the contiguous memory is never
>    freed. Use of these buffers is also inefficient, so low-memory
>    systems tend to quickly run out of usable physical memory.
> 
>  o USB host controllers cannot be detached, so for example, unplugging
>    a cardbus USB device will cause a crash.
> 
> Neither of these issues is completely solved by the patch, but most
> I/O now avoids the need for contiguous buffers by using bus_dmamap_load()
> on the virtual buffer, and the system seems to survive the removal
> of a cardbus OHCI/EHCI controller, though memory is probably leaked.

Can I apply this patch safely to STABLE as well?
If not, then, if you make a patch for STABLE, I would test it right away!

My umass storage USB toy, crashes the system when I umount it.
I blamed the USB chipset (VIA 83C572 USB controller), but am still not sure,
since I did not get much response from the STABLE mailing list.

It would be great if your patch would solve the crash!

Regards,
Rob.





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