USB patch for better bus_dma and detachment support

Julian Elischer julian at
Sat Jun 12 07:15:06 GMT 2004

Barry Bouwsma wrote:
> [drop the above ipv6-only address that only sometimes works from the
>  recipients and I'll catch up later from the archives, thanks]
>>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.

Are there plans to pass these patches back to the netbsd guys?
We don't have enough mass ourselves with USB so we rely on keeping
at least "close" to their code..
Are there plans to commit them?

> Apologies for the lateness of this reply, but if you're interested,
> I've had great success with this patch, apparently helping a few
> annoying problems I've had.
> I've massaged this patch to work against my -stable (with select
> source files derived from -current), and so far I no longer see
> the problems that had occurred regularly:
> :-)  With my uhci controller, if I waited to mount and use a umass
>      device until other programs had snarfed all the system memory,
>      I'd get BBB timeouts when trying to access the device from
>      which I could never recover.
> :-(  My ehci controller, with certain devices, gave a `need data
>      toggle' kernel message during access which either slowed
>      access to a crawl, or inhibited any disk access, or could
>      result in a panic.  This problem still does occur within
>      hours of use if it occurs, but superficially it seems to
>      be better than before.
> The first problem has failed to recur in limited testing after
> applying your patch, so it's a significant improvement for me.
> So far, I appear to have stable operation of my USB storage
> devices with my hardware for a change, though time will tell
> if I just haven't yet triggered the above problems.
> thanks, and sorry for the delay in this feedback.  if this
> patch has not yet been written to apply against 4.x (only
> a few trivial changes appear needed) during the time I've
> been offline, I could be strong-armed into posting needed
> changes to make it work with selected source.
> barry bouwsma
> _______________________________________________
> freebsd-current at mailing list
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at"

+------------------------------------+       ______ _  __
|   __--_|\  Julian Elischer         |       \     U \/ / hard at work in
|  /       \ julian at     +------>x   USA    \ a very strange
| (   OZ    )                                \___   ___ | country !
+- X_.---._/    presently in San Francisco       \_/   \\

More information about the freebsd-current mailing list