USB2+umass: root mount fails
alfred at freebsd.org
Thu Feb 19 07:39:09 PST 2009
I really don't understand why it can't be made an option.
The cold probe can be done right before mountroot where
threads are available.
Not doing this deterministically is bad, but forcing
slow behavior as the only option seems equally bad.
Offering choice seems to be the right solution.
* Hans Petter Selasky <hselasky at c2i.net> [090219 00:24] wrote:
> On Thursday 19 February 2009, Andrew Thompson wrote:
> > I think its slightly more complex that adding a cold explore task.
> Cold explore is not possible any more and adds unneccesary complexity to the
> USB code. USB is dependant on processes/threads/tasks to execute.
> > Most of the USB2 periperhel drivers defer a portion of their attach to a
> > thread task, a change which needs to be reverted first. As others have
> > said both the probe and attach must be synchronous.
> Do you understand why probe and attach is currently partially deferred in some
> drivers? It has to do with the ability to quickly recover if a device is
> suddenly detached when doing multiple sequential USB operations towards a USB
> device. I have the impression that you are not thinking about failure cases
> like constant timeouts. What makes the picture additionaly complicated is
> that there are multiple sources of detach, that do not all go through the USB
> kldunload does not go through the USB stack.
> set_config does.
> device_detach does.
> Another point I have is that we want to do operations in parallell. I see no
> reason at all to slow down the USB enumeration at boot. We are talking about
> a considerable amount of time! Instead the system needs to be changed. If you
> try to mount a device which is not present, then you need to retry mounting
> that device if some re-try flag is set.
> Adding some flag to "struct usb2_device" saying that the device is gone will
> almost solve the problem, but it does not cover the kldunload case. Also it
> can be quite dangerous if attach is hanging and we do a kldunload. Then I
> don't know what will happen. And we don't want to open that window by making
> USB attach always synchronous. Neither should we depend on the EHCI/OHCI/UHCI
> hardware to simply eject transfers on dissappeared devices, see three strikes
> and you are gone rule.
> freebsd-usb at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-usb-unsubscribe at freebsd.org"
- Alfred Perlstein
More information about the freebsd-usb