summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-07-16 17:11:37 +0000
committermiod <miod@openbsd.org>2014-07-16 17:11:37 +0000
commit84bc442efbc03f5723a2b25db108d5e1630f4cbf (patch)
tree12aa8f0b1a38ca81a52df356de1974fb30a955e9
parentinvert the description describing calendar, since it is run by default (diff)
downloadwireguard-openbsd-84bc442efbc03f5723a2b25db108d5e1630f4cbf.tar.xz
wireguard-openbsd-84bc442efbc03f5723a2b25db108d5e1630f4cbf.zip
Do not set pci_dopm to 1 on the Gdium; if we do, rebooting puts the USB HCI in
a state PMON doesn't expect, and can't recover from.
-rw-r--r--sys/arch/loongson/dev/apm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/loongson/dev/apm.c b/sys/arch/loongson/dev/apm.c
index 91ed6d8f920..0e1556333be 100644
--- a/sys/arch/loongson/dev/apm.c
+++ b/sys/arch/loongson/dev/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.20 2014/06/16 20:32:29 pirofti Exp $ */
+/* $OpenBSD: apm.c,v 1.21 2014/07/16 17:11:37 miod Exp $ */
/*-
* Copyright (c) 2001 Alexander Guy. All rights reserved.
@@ -134,8 +134,13 @@ apmmatch(struct device *parent, void *match, void *aux)
void
apmattach(struct device *parent, struct device *self, void *aux)
{
- /* Enable PCI Power Management. */
- pci_dopm = 1;
+ /*
+ * Enable PCI Power Management, except on the Gdium, where this
+ * prevents PMON from initializing the USB controller correctly
+ * after a reboot.
+ */
+ if (sys_platform->system_type != LOONGSON_GDIUM)
+ pci_dopm = 1;
printf("\n");
}