mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-24 16:14:39 +00:00
DM USB: xHCI: fix issue: crash when plug device during UOS booting
This issue is result from reporting interrupt when the interrupt ability of virtual xHCI is disabled. As Event Ring State Machine showed in Figure 20 of xHCI spec, following rules should be followed: 1 when RS bit of USBCMD register is zero, Event Ring should not be accessed; 2 when INTE bit of USBCMD register is zero, Interrupt should not be sent. Tracked-On: #1566 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:
parent
3d94f86812
commit
d7008408d0
@ -1043,6 +1043,12 @@ pci_xhci_change_port(struct pci_xhci_vdev *xdev, int port, int usb_speed,
|
||||
if (!need_intr)
|
||||
return 0;
|
||||
|
||||
if (!(xdev->opregs.usbcmd & XHCI_CMD_INTE))
|
||||
need_intr = 0;
|
||||
|
||||
if (!(xdev->opregs.usbcmd & XHCI_CMD_RS))
|
||||
return 0;
|
||||
|
||||
/* make an event for the guest OS */
|
||||
pci_xhci_set_evtrb(&evtrb,
|
||||
port,
|
||||
|
Loading…
Reference in New Issue
Block a user