summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Usb
diff options
context:
space:
mode:
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-29 06:53:57 +0000
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-29 06:53:57 +0000
commit20bcb757d2d85f59c749e004e580bc2e52a96459 (patch)
treec3669d4aad9729325e31df24dde6504692f64f18 /MdeModulePkg/Bus/Usb
parent1687559138f11d1693bcbb8a2cdfd76061c77e11 (diff)
downloadedk2-platforms-20bcb757d2d85f59c749e004e580bc2e52a96459.tar.xz
MdeMdeModulePkg/Usb: Fixed two usb issues
1.Fix the bug in interface parser logic for usb camera device. Reserve device address if the device doesn’t get disconnected. 2.Some usb 1.1 devices require the context evaluation immediately with actual max packet size after detecting the device max packet size. Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Elvin Li <elvin.li@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14226 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Usb')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c6
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c5
2 files changed, 4 insertions, 7 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c
index 529b136188..35cdaf5527 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c
@@ -2,7 +2,7 @@
Manage Usb Descriptor List
-Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -360,8 +360,8 @@ UsbParseConfigDesc (
Setting = UsbParseInterfaceDesc (DescBuf, Len, &Consumed);
if (Setting == NULL) {
- DEBUG (( EFI_D_ERROR, "UsbParseConfigDesc: failed to parse interface setting\n"));
- goto ON_ERROR;
+ DEBUG (( EFI_D_ERROR, "UsbParseConfigDesc: warning: failed to get interface setting, stop parsing now.\n"));
+ break;
} else if (Setting->Desc.InterfaceNumber >= NumIf) {
DEBUG (( EFI_D_ERROR, "UsbParseConfigDesc: mal-formated interface descriptor\n"));
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
index 74de7d5d50..8340b72de2 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
@@ -2,7 +2,7 @@
Usb bus enumeration support.
-Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -814,9 +814,6 @@ UsbEnumerateNewDev (
return EFI_SUCCESS;
ON_ERROR:
- if (Address != Bus->MaxDevices) {
- Bus->Devices[Address] = NULL;
- }
if (Child != NULL) {
UsbFreeDevice (Child);