diff options
author | Elvin Li <elvin.li@intel.com> | 2014-08-22 01:13:48 +0000 |
---|---|---|
committer | li-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-08-22 01:13:48 +0000 |
commit | acedecdd5ec4f45c9b7d456d01017c43e9fd2fb2 (patch) | |
tree | 916d1b44fe73d476731a6a7f7917acee0892ea15 /MdeModulePkg/Bus | |
parent | 5eadb80f09b246f6934468535dfcaedaccd59c0c (diff) | |
download | edk2-platforms-acedecdd5ec4f45c9b7d456d01017c43e9fd2fb2.tar.xz |
Do not access transfer ring when endpoint is isochronous type and control type. And when one Endpoint is a unknown type, do not ASSERT(0) and process next endpoint.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Signed-off-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15876 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r-- | MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c index e29e727e3c..657020f0da 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c @@ -2606,7 +2606,12 @@ XhcInitializeEndpointContext ( InputContext->EP[Dci-1].CErr = 0;
InputContext->EP[Dci-1].EPType = ED_ISOCH_OUT;
}
- break;
+ //
+ // Do not support isochronous transfer now.
+ //
+ DEBUG ((EFI_D_INFO, "XhcInitializeEndpointContext: Unsupport ISO EP found, Transfer ring is not allocated.\n"));
+ EpDesc = (USB_ENDPOINT_DESCRIPTOR *)((UINTN)EpDesc + EpDesc->Length);
+ continue;
case USB_ENDPOINT_INTERRUPT:
if (Direction == EfiUsbDataIn) {
InputContext->EP[Dci-1].CErr = 3;
@@ -2648,9 +2653,14 @@ XhcInitializeEndpointContext ( break;
case USB_ENDPOINT_CONTROL:
+ //
+ // Do not support control transfer now.
+ //
+ DEBUG ((EFI_D_INFO, "XhcInitializeEndpointContext: Unsupport Control EP found, Transfer ring is not allocated.\n"));
default:
- ASSERT (0);
- break;
+ DEBUG ((EFI_D_INFO, "XhcInitializeEndpointContext: Unknown EP found, Transfer ring is not allocated.\n"));
+ EpDesc = (USB_ENDPOINT_DESCRIPTOR *)((UINTN)EpDesc + EpDesc->Length);
+ continue;
}
PhyAddr = UsbHcGetPciAddrForHostAddr (
@@ -2759,7 +2769,12 @@ XhcInitializeEndpointContext64 ( InputContext->EP[Dci-1].CErr = 0;
InputContext->EP[Dci-1].EPType = ED_ISOCH_OUT;
}
- break;
+ //
+ // Do not support isochronous transfer now.
+ //
+ DEBUG ((EFI_D_INFO, "XhcInitializeEndpointContext64: Unsupport ISO EP found, Transfer ring is not allocated.\n"));
+ EpDesc = (USB_ENDPOINT_DESCRIPTOR *)((UINTN)EpDesc + EpDesc->Length);
+ continue;
case USB_ENDPOINT_INTERRUPT:
if (Direction == EfiUsbDataIn) {
InputContext->EP[Dci-1].CErr = 3;
@@ -2801,9 +2816,14 @@ XhcInitializeEndpointContext64 ( break;
case USB_ENDPOINT_CONTROL:
+ //
+ // Do not support control transfer now.
+ //
+ DEBUG ((EFI_D_INFO, "XhcInitializeEndpointContext64: Unsupport Control EP found, Transfer ring is not allocated.\n"));
default:
- ASSERT (0);
- break;
+ DEBUG ((EFI_D_INFO, "XhcInitializeEndpointContext64: Unknown EP found, Transfer ring is not allocated.\n"));
+ EpDesc = (USB_ENDPOINT_DESCRIPTOR *)((UINTN)EpDesc + EpDesc->Length);
+ continue;
}
PhyAddr = UsbHcGetPciAddrForHostAddr (
|