Skip to content

Commit 29e8150

Browse files
xiaoguangwuwenlingz
authored andcommitted
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>
1 parent f73cf21 commit 29e8150

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

devicemodel/hw/pci/xhci.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2862,8 +2862,9 @@ pci_xhci_handle_transfer(struct pci_xhci_vdev *xdev,
28622862
}
28632863

28642864
err = USB_TO_XHCI_ERR(err);
2865-
if ((err == XHCI_TRB_ERROR_SUCCESS) ||
2866-
(err == XHCI_TRB_ERROR_SHORT_PKT)) {
2865+
if (err == XHCI_TRB_ERROR_SUCCESS ||
2866+
err == XHCI_TRB_ERROR_SHORT_PKT ||
2867+
err == XHCI_TRB_ERROR_STALL) {
28672868
err = pci_xhci_xfer_complete(xdev, xfer, slot, epid, &do_intr);
28682869
if (err != XHCI_TRB_ERROR_SUCCESS)
28692870
do_retry = 0;

0 commit comments

Comments
 (0)