summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-12-26 06:38:15 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-12-26 06:38:15 +0000
commitecb575d9e65c9d52c17866eebba5f798f178effe (patch)
tree2f81da2590be7aa8f6743cbf4bc0839e21c22aef /MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
parentbe0187bbbad2039b83b15aebf9352de27a9d3c00 (diff)
downloadedk2-ecb575d9e65c9d52c17866eebba5f798f178effe.tar.gz
edk2-ecb575d9e65c9d52c17866eebba5f798f178effe.tar.bz2
edk2-ecb575d9e65c9d52c17866eebba5f798f178effe.zip
Enhance the Usb bus driver to support Star with Remaining device path.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4437 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
index 65eb2dd77f..6b46e5c3ce 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
@@ -288,18 +288,24 @@ UsbConnectDriver (
// twisted TPL used. It should be no problem for us to connect
// or disconnect at CALLBACK.
//
- OldTpl = UsbGetCurrentTpl ();
- DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL before connect is %d\n", OldTpl));
+
+ //
+ // Only recursively wanted usb child device
+ //
+ if (UsbBusIsWantedUsbIO (UsbIf->Device->Bus, UsbIf)) {
+ OldTpl = UsbGetCurrentTpl ();
+ DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL before connect is %d\n", OldTpl));
- gBS->RestoreTPL (TPL_CALLBACK);
+ gBS->RestoreTPL (TPL_CALLBACK);
- Status = gBS->ConnectController (UsbIf->Handle, NULL, NULL, TRUE);
- UsbIf->IsManaged = (BOOLEAN)!EFI_ERROR (Status);
+ Status = gBS->ConnectController (UsbIf->Handle, NULL, NULL, TRUE);
+ UsbIf->IsManaged = (BOOLEAN)!EFI_ERROR (Status);
- DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL after connect is %d\n", UsbGetCurrentTpl()));
- ASSERT (UsbGetCurrentTpl () == TPL_CALLBACK);
+ DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL after connect is %d\n", UsbGetCurrentTpl()));
+ ASSERT (UsbGetCurrentTpl () == TPL_CALLBACK);
- gBS->RaiseTPL (OldTpl);
+ gBS->RaiseTPL (OldTpl);
+ }
}
return Status;