summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-07-16 17:11:38 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-07-16 17:11:38 +0000
commit428ba370b692e5d2c7645f876929fea81da7599f (patch)
treea5d6dd9a0e54c51c8d8466bef260c774e48db73b /sys/arch
parent161686d4bceebe1fff3ab3a1bd77b9dfbbdfb323 (diff)
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.
Diffstat (limited to 'sys/arch')
-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");
}