usb/82569: [usb] USB mass storage plug/unplug causes system panic

M. Warner Losh imp at bsdimp.com
Sat May 26 08:21:44 UTC 2007


In message: <200705261012.57815.hselasky at freebsd.org>
            Hans Petter Selasky <hselasky at FreeBSD.ORG> writes:
: On Saturday 26 May 2007 08:02, Mark Linimon wrote:
: > Synopsis: [usb] USB mass storage plug/unplug causes system panic
: >
: > State-Changed-From-To: open->suspended
: > State-Changed-By: linimon
: > State-Changed-When: Sat May 26 06:02:04 UTC 2007
: > State-Changed-Why:
: > Mark this 'suspended' as it is a known problem that will require an
: > extensive rework to fix.
: >
: 
: This is not really an USB problem. It is a generic CAM layer problem, and we 
: should have a good solution for it!

There's many layers to this onion.  Even if one were to solve the CAM
layer problem, and that's a fairly minor problem in the scheme of
things, the VM layer really hates it when devices disappear.  There's
too many cached copies of things.  The CAM problems just have to do
with the SIM disappearing.

One could argue that one needs to defer the device disappearance until
one can be sure that all outstanding I/O is bioerrored() back to the
source, which requires some help in the leaf driver nodes.

One could also argue that one should have one SIM per root usb hub,
and all the umass devices use it.  This would allow for stupid devices
to be more effectively supported (since the leave/arrival would be
transparent to higher levels).  firewire does something similar right
now, and it works a lot better than usb's implementation.  while not
perfect, I can pull out a firewire disk and the system just stalls the
I/Os.  I can then plug it back in and resume where it left off.  Very
nice feature that.

Warner


More information about the freebsd-usb mailing list