On 08/27/15 19:10, Andrew Fish wrote: > >> On Aug 27, 2015, at 9:02 AM, Robinson, Keith <[email protected]> >> wrote: >> >> >> Hello, >> >> I am trying to determine if it is possible to write a UEFI >> application that allows the user to swap USB mass storage devices >> and re-enumerate the new device inserted. >> > > The USB stack is hot plug, and the EFI Driver model is basically hot > plug via the Driver Binding protocol (Support, Start, and Stop). The > USB bus driver will call Stop we a device is removed, and Start when > a device is added. > > Generally the problem is the Application does not follow the EFI > Driver Model and it end sup hanging on to some protocol that “goes > away”. I think I posted an example library, SafeProtocolOpenLib, to > the mailing list a while back with an example of how to make BlockIo > safe.
That patch has been very hard to find, traditionally, in the list archive(s). So I make it a point to provide a pointer whenever this comes up. (I think keeping it in a public git repo somewhere would be more useful.) So, the patch is called "safe.patch", and it is attached to the message in <http://thread.gmane.org/gmane.comp.bios.tianocore.devel/1989>. Thanks Laszlo _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

