mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-06 17:21:22 +00:00
DM USB: xHCI: refine the logic of Stop Endpoint cmd
When the Stop Endpoint command is trapped, should not clear all the data structure. Instead, only reset the ring buffer. The reason is the xHCI may continue queue TRB without doing whole initializing process again. Tracked-On: #3401 Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
@@ -1321,6 +1321,7 @@ pci_xhci_portregs_write(struct pci_xhci_vdev *xdev,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
UPRINTF(LDBG, "Port new PLS: %d\r\n", newpls);
|
UPRINTF(LDBG, "Port new PLS: %d\r\n", newpls);
|
||||||
|
|
||||||
switch (newpls) {
|
switch (newpls) {
|
||||||
case 0: /* U0 */
|
case 0: /* U0 */
|
||||||
case 3: /* U3 */
|
case 3: /* U3 */
|
||||||
@@ -2215,10 +2216,10 @@ pci_xhci_cmd_reset_ep(struct pci_xhci_vdev *xdev,
|
|||||||
/* let usb_dev_comp_req to free the memory */
|
/* let usb_dev_comp_req to free the memory */
|
||||||
libusb_cancel_transfer(r->trn);
|
libusb_cancel_transfer(r->trn);
|
||||||
}
|
}
|
||||||
memset(xfer, 0, sizeof(*xfer));
|
|
||||||
|
|
||||||
if (devep->ep_xfer)
|
xfer->ndata = 0;
|
||||||
memset(devep->ep_xfer, 0, sizeof(*devep->ep_xfer));
|
xfer->head = 0;
|
||||||
|
xfer->tail = 0;
|
||||||
|
|
||||||
ep_ctx->dwEpCtx0 = (ep_ctx->dwEpCtx0 & ~0x7) | XHCI_ST_EPCTX_STOPPED;
|
ep_ctx->dwEpCtx0 = (ep_ctx->dwEpCtx0 & ~0x7) | XHCI_ST_EPCTX_STOPPED;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user