summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include/pci_machdep.h
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2013-11-06 10:40:37 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2013-11-06 10:40:37 +0000
commit1b2cca43962b305f5786dcdfc424ca22ce44cce6 (patch)
tree47f46e685c87dffdf5bee15e7cb55f4aee71f6a9 /sys/arch/amd64/include/pci_machdep.h
parent65d3cf7e6b97615ce69a5bc0815fcdd5f188376e (diff)
Add support for Power Resources for Dx states and the necessary hook
for PCI devices. This hook should be called twice, before and after changing the power state of a PCI device. Before setting the device to the new state, the ACPI layer will notify every power resources linked to the device for that state and make sure they are turned "_ON". After changing the state of the device, it will decrement the reference of every power resources linked to that device for the old state and turn them "_OFF" if they are no longer referenced. This fixes the no-USB after resume problem seen on various ThinkPad, problem initialy diagnosed with Alexander Polakov. ok kettenis@, deraadt@
Diffstat (limited to 'sys/arch/amd64/include/pci_machdep.h')
-rw-r--r--sys/arch/amd64/include/pci_machdep.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/amd64/include/pci_machdep.h b/sys/arch/amd64/include/pci_machdep.h
index 51894074a34..395970faffd 100644
--- a/sys/arch/amd64/include/pci_machdep.h
+++ b/sys/arch/amd64/include/pci_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.h,v 1.21 2012/09/19 23:23:50 kettenis Exp $ */
+/* $OpenBSD: pci_machdep.h,v 1.22 2013/11/06 10:40:36 mpi Exp $ */
/* $NetBSD: pci_machdep.h,v 1.1 2003/02/26 21:26:11 fvdl Exp $ */
/*
@@ -95,6 +95,7 @@ void pci_decompose_tag(pci_chipset_tag_t, pcitag_t,
void pci_dev_postattach(struct device *, struct pci_attach_args *);
pcireg_t pci_min_powerstate(pci_chipset_tag_t, pcitag_t);
+void pci_set_powerstate_md(pci_chipset_tag_t, pcitag_t, int, int);
/*
* ALL OF THE FOLLOWING ARE MACHINE-DEPENDENT, AND SHOULD NOT BE USED