USB2+umass: root mount fails

Marcel Moolenaar xcllnt at mac.com
Mon Feb 16 15:52:11 PST 2009


On Feb 16, 2009, at 3:13 PM, M. Warner Losh wrote:

> In message: <ACB7DFF1-6C8E-4936-9BD9-BB2FD375F3BB at mac.com>
>            Marcel Moolenaar <xcllnt at mac.com> writes:
> : Before I dig into the code, what's the current status of
> : root mounts on USB mass storage devices?
>
> First, there's a kludge-o-round that is similar to your "sleep 10"
> that you've added.  It loops waiting for more devices to show up if
> the desired root file system hasn't appeared yet.
>
> There's no way for hot-plug busses to tell the kernel "I've tried my
> best to enumerate everything on my bus, and I'm done"

Of course there is. Any and all USB hubs have a certain
number of ports. You can trivially iterate over all of
them and declare completion when you've tried them all.

Recursion is also not a big deal. When you find a HUB
underneath a port, you iterate over all the ports of
that downstream hub before you declare completion of
the USB discovery process.

When the USB discovery process is done, you release
the root mount lock...

So what's the problem?

-- 
Marcel Moolenaar
xcllnt at mac.com





More information about the freebsd-usb mailing list