summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-04-07 15:34:28 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-04-07 15:34:28 +0000
commit96cc114910f4e1895086787fcaa74482e77e584b (patch)
tree177b8a7b6df5914a451718a34eeabd59f3e7aa8f /sys/dev/usb
parent9400e38dcb6abc2e719f00330fa23a4290c1ec40 (diff)
Use the `use_polling' hack to make sure usb_delay_ms() will not
call tsleep(9) on resume. deraadt@ pointed that this not needed for powerdown since `cold' is set. Another approach would be to call delay() directly in the reset functions, but let stay coherent with the other HC drivers.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/xhci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c
index 53a32d433ee..69856b3c4f4 100644
--- a/sys/dev/usb/xhci.c
+++ b/sys/dev/usb/xhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xhci.c,v 1.8 2014/04/03 14:42:15 mpi Exp $ */
+/* $OpenBSD: xhci.c,v 1.9 2014/04/07 15:34:27 mpi Exp $ */
/*
* Copyright (c) 2014 Martin Pieuchot
@@ -438,10 +438,14 @@ xhci_activate(struct device *self, int act)
switch (act) {
case DVACT_RESUME:
+ sc->sc_bus.use_polling++;
+
xhci_reset(sc);
xhci_ring_reset(sc, &sc->sc_cmd_ring);
xhci_ring_reset(sc, &sc->sc_evt_ring);
xhci_config(sc);
+
+ sc->sc_bus.use_polling--;
rv = config_activate_children(self, act);
break;
case DVACT_POWERDOWN: