This fixes both the Lemote reboot issue and the USB issue on the
Gdium's that miod@ spotted.
Suggested by kettenis@, thanks!
Okay miod@
-/* $OpenBSD: apm.c,v 1.22 2014/07/19 12:54:09 pirofti Exp $ */
+/* $OpenBSD: apm.c,v 1.23 2014/07/19 18:01:23 pirofti Exp $ */
/*-
* Copyright (c) 2001 Alexander Guy. All rights reserved.
#include <machine/cpu.h>
#include <machine/apmvar.h>
+#include <dev/pci/pcivar.h> /* pci_dopm */
+
#include <dev/wscons/wsdisplayvar.h>
#include <loongson/dev/kb3310var.h>
void
apmattach(struct device *parent, struct device *self, void *aux)
{
+ /* Enable PCI Power Management. */
+ pci_dopm = 1;
+
printf("\n");
}
-/* $OpenBSD: machdep.c,v 1.56 2014/07/13 22:53:39 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.57 2014/07/19 18:01:23 pirofti Exp $ */
/*
* Copyright (c) 2009, 2010, 2014 Miodrag Vallat.
haltsys:
doshutdownhooks();
mainbus = device_mainbus();
- if (mainbus != NULL)
+ if (mainbus != NULL) {
+ pci_dopm = 0;
config_suspend(mainbus, DVACT_POWERDOWN);
+ }
if (howto & RB_HALT) {
if (howto & RB_POWERDOWN) {