mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-23 15:44:09 +00:00
DM USB: xHCI: refine stop endpoint logic
According to xHCI spec, the Stop Endpoint command should execute no matter the endpoint is in halted state or not, but current implementation just refuse do the command and return error to Guest OS. It is wrong and this patch is used to fix it. 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> Tracked-On: #1366
This commit is contained in:
parent
adc7913741
commit
2d00a99a4c
@ -1942,7 +1942,8 @@ pci_xhci_cmd_reset_ep(struct pci_xhci_vdev *xdev,
|
|||||||
assert(dev_ctx != NULL);
|
assert(dev_ctx != NULL);
|
||||||
ep_ctx = &dev_ctx->ctx_ep[epid];
|
ep_ctx = &dev_ctx->ctx_ep[epid];
|
||||||
|
|
||||||
if ((ep_ctx->dwEpCtx0 & 0x7) != XHCI_ST_EPCTX_HALTED) {
|
if (type == XHCI_TRB_TYPE_RESET_EP &&
|
||||||
|
(ep_ctx->dwEpCtx0 & 0x7) != XHCI_ST_EPCTX_HALTED) {
|
||||||
cmderr = XHCI_TRB_ERROR_CONTEXT_STATE;
|
cmderr = XHCI_TRB_ERROR_CONTEXT_STATE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user