Enabling usb3.0 XHCI support.

Signed-off-by: erictian
Reviewed-by: jshi19

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12185 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
erictian
2011-08-23 14:36:33 +00:00
parent da910a42c0
commit 92870c983c
16 changed files with 8055 additions and 97 deletions

View File

@@ -527,12 +527,14 @@ UsbGetMaxPacketSize0 (
// Get the first 8 bytes of the device descriptor which contains
// max packet size for endpoint 0, which is at least 8.
//
UsbDev->MaxPacket0 = 8;
for (Index = 0; Index < 3; Index++) {
Status = UsbCtrlGetDesc (UsbDev, USB_DESC_TYPE_DEVICE, 0, 0, &DevDesc, 8);
if (!EFI_ERROR (Status)) {
if ((DevDesc.BcdUSB == 0x0300) && (DevDesc.MaxPacketSize0 == 9)) {
UsbDev->MaxPacket0 = 1 << 9;
return EFI_SUCCESS;
}
UsbDev->MaxPacket0 = DevDesc.MaxPacketSize0;
return EFI_SUCCESS;
}