From 84bc442efbc03f5723a2b25db108d5e1630f4cbf Mon Sep 17 00:00:00 2001 From: miod Date: Wed, 16 Jul 2014 17:11:37 +0000 Subject: [PATCH] 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. --- sys/arch/loongson/dev/apm.c | 11 ++++++++--- 1 file 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"); } -- 2.20.1