diff options
author | dtang2 <dtang2@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-13 06:36:11 +0000 |
---|---|---|
committer | dtang2 <dtang2@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-13 06:36:11 +0000 |
commit | 71a62114eb16255adaf886be35edecf0045bb494 (patch) | |
tree | 79873d22e4a8b23eab65bcee3ca8c7c108e42d6c /EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c | |
parent | a98f11c5b9663638bca1fd7518a783c33c420039 (diff) | |
download | edk2-platforms-71a62114eb16255adaf886be35edecf0045bb494.tar.xz |
1. Add the GLOBAL_REMOVE_IF_UNREFERENCED to globe variables which are used only in debug version;
2. Use ZeroMem to replace gBS->SetMem;
3. Remove marked code;
4. Add IsHub judgement in UsbPortReset function to following EFI1.1 spec;
5. Add brackets for macro definition
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1740 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c')
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c index 1d1f44d638..d9387a60b1 100644 --- a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c +++ b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c @@ -23,8 +23,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "usbbus.h"
-UINTN gUSBDebugLevel = EFI_D_INFO;
-UINTN gUSBErrorLevel = EFI_D_ERROR;
+
+GLOBAL_REMOVE_IF_UNREFERENCED UINTN gUSBDebugLevel = EFI_D_INFO;
+GLOBAL_REMOVE_IF_UNREFERENCED UINTN gUSBErrorLevel = EFI_D_ERROR;
//
// The UsbBusProtocol is just used to locate USB_BUS_CONTROLLER
@@ -2328,17 +2329,18 @@ UsbPortReset ( --*/
{
USB_IO_CONTROLLER_DEVICE *UsbIoController;
- EFI_STATUS Status;
UsbIoController = USB_IO_CONTROLLER_DEVICE_FROM_USB_IO_THIS (This);
+ if (IsHub (UsbIoController)) {
+ return EFI_INVALID_PARAMETER;
+ }
+
//
// Since at this time, this device has already been configured,
// it needs to be re-configured.
//
- Status = ParentPortReset (UsbIoController, TRUE, 0);
-
- return Status;
+ return ParentPortReset (UsbIoController, TRUE, 0);
}
EFI_STATUS
|