panic after removing usb flash drive

M. Warner Losh imp at bsdimp.com
Wed Aug 31 22:00:28 PDT 2005


In message: <20050831.224412.98347286.imp at bsdimp.com>
            "M. Warner Losh" <imp at bsdimp.com> writes:
: In message: <20050831174631.GE37930 at cicely12.cicely.de>
:             Bernd Walter <ticso at cicely12.cicely.de> writes:
: : Yes - umass creates a SIM, bus and targed, because that is what a user
: : really attaches/detaches.
: 
: For what it is worth, in the PC Card and CardBus case, the drivers
: aren't allowed to 'fail' the detach.  They are required to succeed,
: and are removed from the driver tree if they try to return a failure
: code.  All their resources are removed and interrupts are removed.
: The hardware is gone, and the driver has no say so about going away.
: At least that's the model we currently have.

Also, in detach, drivers are supposed to wait for all their references
to go away before returning.  If they have any threads running, it is
their job to clean them up, etc.  This means, however, that cam PC
Card and CardBus drivers have issues detaching (since CAM has issues
detaching SIMs).  Hopefully your work with CAM will help this
situation, and I look forward to it.

Having a virtual driver that attaches to the physical driver, like we
talked about in IRC, wouldn't violate those assumptions.

Warner


More information about the freebsd-current mailing list