Skip to content

Commit 6c1ca13

Browse files
xiaoguangwuwenlingz
authored andcommitted
DM USB: xHCI: remove the waiting 5 seconds wa for s3
This workaround will delay the UOS resuming for 5 seconds, this behavior is not right and should be replaced by dynamic style. 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>
1 parent 4fc5dcf commit 6c1ca13

File tree

3 files changed

+0
-23
lines changed

3 files changed

+0
-23
lines changed

devicemodel/core/main.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@
6666
#include "vmcfg.h"
6767
#include "tpm.h"
6868
#include "virtio.h"
69-
#include "usb.h"
70-
#include "xhci.h"
7169

7270
#define GUEST_NIO_PORT 0x488 /* guest upcalls via i/o port */
7371

@@ -648,7 +646,6 @@ vm_suspend_resume(struct vmctx *ctx)
648646

649647
vm_stop_watchdog(ctx);
650648
wait_for_resume(ctx);
651-
wait_for_xhci_resume();
652649

653650
pm_backto_wakeup(ctx);
654651
vm_reset_watchdog(ctx);

devicemodel/hw/pci/xhci.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -486,24 +486,6 @@ static struct pci_xhci_option_elem xhci_option_table[] = {
486486
{"cap", pci_xhci_parse_extcap}
487487
};
488488

489-
void
490-
wait_for_xhci_resume()
491-
{
492-
/* The reason of waiting for resuming is USB virtualization
493-
* needs do TWO PASS SEQUENTIAL enumerations: one for SOS and
494-
* the other for UOS after SOS USB resuming work is completely
495-
* done. So, theoretically, virtual USB resuming MUST use more
496-
* time than its native counterpart.
497-
*/
498-
499-
/* FIXME: will substitute it by dynamic way. The thought is
500-
* waiting time is calculated by the number of USB devices
501-
* attached. More devices, more waiting time, no device no
502-
* waiting.
503-
*/
504-
sleep(5);
505-
}
506-
507489
static int
508490
pci_xhci_get_free_vport(struct pci_xhci_vdev *xdev,
509491
struct usb_native_devinfo *di)

devicemodel/include/xhci.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,4 @@ struct xhci_event_ring_seg {
377377
volatile uint32_t dwEvrsReserved;
378378
};
379379

380-
void wait_for_xhci_resume();
381-
382380
#endif /* _XHCI_H_ */

0 commit comments

Comments
 (0)