mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 18:14:53 +00:00
DM USB: xHCI: WA for an isochronous crash issue
The current xHCI mediator doesn't well support disable endpoint command. This patch is one workaround for disable endpoint command to avoid xHCI mediator to continue handle already dropped data. Tracked-On: #2927 Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
@@ -1606,6 +1606,7 @@ pci_xhci_init_ep(struct pci_xhci_dev_emu *dev, int epid)
|
||||
USB_DATA_XFER_INIT(devep->ep_xfer);
|
||||
devep->ep_xfer->dev = (void *)dev;
|
||||
devep->ep_xfer->epid = epid;
|
||||
devep->ep_xfer->magic = USB_DROPPED_XFER_MAGIC;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
@@ -1631,6 +1632,7 @@ pci_xhci_disable_ep(struct pci_xhci_dev_emu *dev, int epid)
|
||||
free(devep->ep_sctx_trbs);
|
||||
|
||||
if (devep->ep_xfer != NULL) {
|
||||
memset(devep->ep_xfer, 0, sizeof(*devep->ep_xfer));
|
||||
free(devep->ep_xfer);
|
||||
devep->ep_xfer = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user