mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-13 12:59:45 +00:00
DM USB: add some preparing time for xHCI emulation before resuming.
If the USB kernel drives and devices of SOS are not available and functional ready after UOS is resumed from frozen state, the comming USB command from UOS will cause a disaster because the DM has no resourse to to emulation. This patch add a dynamic time span (could change according to number of native USB devices attached) to give USB drivers and devices of SOS an opportunity to be ready. Tracked-On: #1893 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:
@@ -66,6 +66,8 @@
|
||||
#include "vmcfg.h"
|
||||
#include "tpm.h"
|
||||
#include "virtio.h"
|
||||
#include "usb.h"
|
||||
#include "xhci.h"
|
||||
|
||||
#define GUEST_NIO_PORT 0x488 /* guest upcalls via i/o port */
|
||||
|
||||
@@ -631,6 +633,7 @@ vm_suspend_resume(struct vmctx *ctx)
|
||||
|
||||
vm_stop_watchdog(ctx);
|
||||
wait_for_resume(ctx);
|
||||
wait_for_xhci_resume();
|
||||
|
||||
pm_backto_wakeup(ctx);
|
||||
vm_reset_watchdog(ctx);
|
||||
|
Reference in New Issue
Block a user