DM USB: xHCI: workaround for Stop Endpoint Command handling

This patch is one workaround to resolve a crash issue for certain brand
touch screen (eGalaxTouch EXC7200-7368v1.01). The formal fix should
follow the xHCI spec to stop xfer and generate transfer completed event
trb prior to Stop Endpoint Command complete event trb. It should be a
big change and for short term, do nothing for the stop endpoint command
which is no other side effect be observed so far.

Tracked-On: #1413
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-10-18 23:09:50 +08:00
committed by Xie, Nanlin
parent ecf0585bf2
commit 6a9a46ac47
3 changed files with 8 additions and 20 deletions

View File

@@ -2053,7 +2053,8 @@ pci_xhci_cmd_reset_ep(struct pci_xhci_vdev *xdev,
epid = XHCI_TRB_3_EP_GET(trb->dwTrb3);
UPRINTF(LDBG, "reset ep %u: slot %u\r\n", epid, slot);
UPRINTF(LDBG, "reset ep %u: slot %u cmd_type: %02X\r\n", epid, slot,
XHCI_TRB_3_TYPE_GET(trb->dwTrb3));
cmderr = XHCI_TRB_ERROR_SUCCESS;
@@ -2083,6 +2084,12 @@ pci_xhci_cmd_reset_ep(struct pci_xhci_vdev *xdev,
goto done;
}
/* FIXME: Currently nothing to do when Stop Endpoint Command is
* received. Will refine it strictly according to xHCI spec.
*/
if (type == XHCI_TRB_TYPE_STOP_EP)
goto done;
devep = &dev->eps[epid];
if (devep->ep_xfer != NULL)
USB_DATA_XFER_RESET(devep->ep_xfer);