DM USB: xHCI: refine error handling logic for ctrl transfer

Under current implementation, when USB control transfer failed
with Endpoint Stall error, there is no response reporting to UOS.
This logic will result of timeout in UOS kernel and hence a longer
enumeration process.

This patch reports the Stall Error to UOS by xHCI Completion Event,
which will fix this issue.

Tracked-On: #1895
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Liang Yang <liang3.yang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
Xiaoguang Wu 2018-11-07 14:35:41 +08:00 committed by wenlingz
parent f73cf21187
commit 29e81501c5

View File

@ -2862,8 +2862,9 @@ retry:
}
err = USB_TO_XHCI_ERR(err);
if ((err == XHCI_TRB_ERROR_SUCCESS) ||
(err == XHCI_TRB_ERROR_SHORT_PKT)) {
if (err == XHCI_TRB_ERROR_SUCCESS ||
err == XHCI_TRB_ERROR_SHORT_PKT ||
err == XHCI_TRB_ERROR_STALL) {
err = pci_xhci_xfer_complete(xdev, xfer, slot, epid, &do_intr);
if (err != XHCI_TRB_ERROR_SUCCESS)
do_retry = 0;