diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-19 08:06:15 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-19 08:06:15 +0000 |
commit | 61fb1657e5b2b37a2ec5c879f6fa7689100f0d54 (patch) | |
tree | ad1debff869454be6fdf84bc7528597931b57dcc /EdkModulePkg/Bus/Usb | |
parent | 8b018de64f54b67f437c95bf0ed591b03a6cc63b (diff) | |
download | edk2-platforms-61fb1657e5b2b37a2ec5c879f6fa7689100f0d54.tar.xz |
Fix component name bugs when input Controller Name is invalid
Fix the driver binding version for platform/OEM specific drivers
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2274 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Bus/Usb')
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbBot/Dxe/ComponentName.c | 12 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c | 2 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c | 2 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/Cbi0.c | 2 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/ComponentName.c | 12 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi1/cbi1.c | 2 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c | 2 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c | 2 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c | 2 |
9 files changed, 29 insertions, 9 deletions
diff --git a/EdkModulePkg/Bus/Usb/UsbBot/Dxe/ComponentName.c b/EdkModulePkg/Bus/Usb/UsbBot/Dxe/ComponentName.c index 6a9cf13456..34ab75864f 100644 --- a/EdkModulePkg/Bus/Usb/UsbBot/Dxe/ComponentName.c +++ b/EdkModulePkg/Bus/Usb/UsbBot/Dxe/ComponentName.c @@ -161,7 +161,17 @@ UsbBotComponentNameGetControllerName ( if (ChildHandle != NULL) {
return EFI_UNSUPPORTED;
}
-
+ //
+ // Make sure this driver is currently managing ControllerHandle
+ //
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gUsbBotDriverBinding.DriverBindingHandle,
+ &gEfiUsbIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
//
// Get the device context
//
diff --git a/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c b/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c index 8cd6b8e6f6..acba154842 100644 --- a/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c +++ b/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c @@ -62,7 +62,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbBotDriverBinding = { BotDriverBindingSupported,
BotDriverBindingStart,
BotDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c index 7bbb6f7a06..837a6001dd 100644 --- a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c +++ b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c @@ -68,7 +68,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbBusDriverBinding = { UsbBusControllerDriverSupported,
UsbBusControllerDriverStart,
UsbBusControllerDriverStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/Cbi0.c b/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/Cbi0.c index 913ac225e9..d9b094d114 100644 --- a/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/Cbi0.c +++ b/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/Cbi0.c @@ -73,7 +73,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbCbi0DriverBinding = { Cbi0DriverBindingSupported,
Cbi0DriverBindingStart,
Cbi0DriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/ComponentName.c b/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/ComponentName.c index 7bbbb0f701..7d16b5a1e3 100644 --- a/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/ComponentName.c +++ b/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/ComponentName.c @@ -163,7 +163,17 @@ UsbCbi0ComponentNameGetControllerName ( if (ChildHandle != NULL) {
return EFI_UNSUPPORTED;
}
-
+ //
+ // Make sure this driver is currently managing ControllerHandle
+ //
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gUsbCbi0DriverBinding.DriverBindingHandle,
+ &gEfiUsbIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
//
// Get the device context
//
diff --git a/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi1/cbi1.c b/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi1/cbi1.c index dd1c927dae..d778497096 100644 --- a/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi1/cbi1.c +++ b/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi1/cbi1.c @@ -117,7 +117,7 @@ EFI_DRIVER_BINDING_PROTOCOL gCBI1DriverBinding = { CBI1DriverBindingSupported,
CBI1DriverBindingStart,
CBI1DriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c b/EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c index a59de11998..ec496a6e39 100644 --- a/EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c +++ b/EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c @@ -103,7 +103,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbKeyboardDriverBinding = { USBKeyboardDriverBindingSupported,
USBKeyboardDriverBindingStart,
USBKeyboardDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c b/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c index 932b8c5ed9..0d57f7642d 100644 --- a/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c +++ b/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c @@ -109,7 +109,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUSBFloppyDriverBinding = { USBFloppyDriverBindingSupported,
USBFloppyDriverBindingStart,
USBFloppyDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c b/EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c index 81da0205a4..063247376b 100644 --- a/EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c +++ b/EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c @@ -61,7 +61,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = { USBMouseDriverBindingSupported,
USBMouseDriverBindingStart,
USBMouseDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
|