// twisted TPL used. It should be no problem for us to connect\r
// or disconnect at CALLBACK.\r
//\r
- OldTpl = UsbGetCurrentTpl ();\r
- DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL before connect is %d\n", OldTpl));\r
+ \r
+ //\r
+ // Only recursively wanted usb child device\r
+ //\r
+ if (UsbBusIsWantedUsbIO (UsbIf->Device->Bus, UsbIf)) {\r
+ OldTpl = UsbGetCurrentTpl ();\r
+ DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL before connect is %d\n", OldTpl));\r
\r
- gBS->RestoreTPL (TPL_CALLBACK);\r
+ gBS->RestoreTPL (TPL_CALLBACK);\r
\r
- Status = gBS->ConnectController (UsbIf->Handle, NULL, NULL, TRUE);\r
- UsbIf->IsManaged = (BOOLEAN)!EFI_ERROR (Status);\r
+ Status = gBS->ConnectController (UsbIf->Handle, NULL, NULL, TRUE);\r
+ UsbIf->IsManaged = (BOOLEAN)!EFI_ERROR (Status);\r
\r
- DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL after connect is %d\n", UsbGetCurrentTpl()));\r
- ASSERT (UsbGetCurrentTpl () == TPL_CALLBACK);\r
+ DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL after connect is %d\n", UsbGetCurrentTpl()));\r
+ ASSERT (UsbGetCurrentTpl () == TPL_CALLBACK);\r
\r
- gBS->RaiseTPL (OldTpl);\r
+ gBS->RaiseTPL (OldTpl);\r
+ }\r
}\r
\r
return Status;\r