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.