Subject: Re: My experience with the _RCs so far
To: Jaromir Dolecek <>
From: Frank van der Linden <>
List: port-i386
Date: 10/10/2004 15:28:26
On Sun, Oct 10, 2004 at 12:38:36PM +0200, Jaromir Dolecek wrote:
> Indeed. This problem is on must-fix problem list for NetBSD 3.0.
> If the fix would not involve huge structural changes, I imagine
> it might appear even in some 2.x patch release. However, it would
> not hold the 2.0 release.

A temporary fix isn't that hard, and can be implemented in a day.
Aallocate a chunk of contiguous memory (using bus_dmamem_alloc)
directly at attach time in uhci. If a later memory allocation
request fails, fall back to using the chunk that was allocated
at boot. It can be managed using a simple extent-based scheme.

It's not a big waste of memory. The standard setup for most systems
these days is 2 or 4 uhci controllers, with a 2-port hub attached
internally. The maximum requested chunk seems to be MAXPHYS, which
is 64k on most architectures.

So, to be able to handle 2 umass devices, you need 128k of memory
per uhci, which would waste 512k if you have 4 of them. To be
a bit more generous, use 256k per uchi, making it 1M. 1M is
a small amount for systems that have USB.

Now, this is not guaranteed to work, you could still attach an
8-port hub and attach an umass device to each port. But that's
not a very likely scenario.

The same can be done for cardbus, if needed.

Is it the final, clean solution? Definitely not, but it's not
horribly ugly either, and a good temp fix.

- Frank