summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Pci/XhciDxe
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2017-07-25 11:24:01 +0800
committerStar Zeng <star.zeng@intel.com>2017-07-26 16:06:19 +0800
commit958a81813bd9790b04199fce077918d08257e1a4 (patch)
tree73bd66e28330aff5021ea0c74a7cde2e609a024b /MdeModulePkg/Bus/Pci/XhciDxe
parentb926a05bb93705fc2b59b50c55099353bd1ac49f (diff)
downloadedk2-958a81813bd9790b04199fce077918d08257e1a4.tar.gz
edk2-958a81813bd9790b04199fce077918d08257e1a4.tar.bz2
edk2-958a81813bd9790b04199fce077918d08257e1a4.zip
MdeModulePkg Xhci: Also RecoverHaltedEndpoint for BABBLE_ERROR
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=644 According to XHCI spec: 4.10.2.1 Stall Error 4.10.2.4 Babble Detected Error When a device transmits more data on the USB than the host controller is expecting for a transaction, it is defined to be babbling. In general, this is called a Babble Error. When a device sends more data than the TD Transfer Size bytes (TD Babble), unexpected activity that persists beyond a specified point in a (micro)frame (Frame Babble), or a packet greater than Max Packet Size (Packet Babble), the host controller shall set the Babble Detected Error in the Completion Code field of the TRB, generate an Error Event, and halt the endpoint (refer to Section 4.10.2.1). This patch is to also check for EFI_USB_ERR_BABBLE error returned as a TransferResult and then proceed to XhcRecoverhaltedEndPoint. Cc: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'MdeModulePkg/Bus/Pci/XhciDxe')
-rw-r--r--MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
index 20ad3f1611..c884f4c314 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
@@ -801,7 +801,7 @@ XhcTransfer (
*TransferResult = Urb->Result;
*DataLength = Urb->Completed;
- if (*TransferResult == EFI_USB_ERR_STALL) {
+ if ((*TransferResult == EFI_USB_ERR_STALL) || (*TransferResult == EFI_USB_ERR_BABBLE)) {
ASSERT (Status == EFI_DEVICE_ERROR);
RecoveryStatus = XhcRecoverHaltedEndpoint(Xhc, Urb);
if (EFI_ERROR (RecoveryStatus)) {