PATCH: power down acpi and pci devices in suspend/resume
Kevin Oberman
oberman at es.net
Mon Nov 29 14:16:55 PST 2004
> Date: Mon, 29 Nov 2004 11:15:05 -0800
> From: Nate Lawson <nate at root.org>
>
> Kevin Oberman wrote:
> >
> > The new patch removed the annoying "bad Vcc request" messages, but
> > that's all it improved. With the new patch I still lose cbb1 and
> > anything connected to it. I see no real difference in the log other than
> > the disappearance of the Vcc messages, but that is a good thing.
> >
> > If I set debug.suspend_power to '0', everything works as it did
> > before. All PCI and CardBus devices seem to work fine after resume.
>
> Ok, I've revved it to only power down type 0 PCI (i.e. normal) devices
> so it shouldn't touch your cbb bridge. Please try the attached patch.
> Note that there are now two separate tunables/sysctls to disable
> powerstates:
>
> hw.pci.do_powerstate=1
> debug.acpi.do_powerstate=1
>
> This way you can disable PCI and ACPI power separately for debugging.
> Once things are stabilized, these will go away.
Nate,
I tried to patch STABLE with this and the third patch for pci.c
failed. I don't see why. Maybe whitespace? In any case, I did that one
by hand, but I could not compile a kernel.
cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -g -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/contrib/dev/acpica -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/contrib/pf -I/usr/src/sys/contrib/dev/ath -I/usr/src/sys/contrib/dev/ath/freebsd -I/usr/src/sys/contrib/ngatm -D_KERNEL -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror /usr/src/sys/dev/pci/pci.c
/usr/src/sys/dev/pci/pci.c: In function `pci_suspend':
/usr/src/sys/dev/pci/pci.c:1057: warning: implicit declaration of function `ACPI_PWR_FOR_SLEEP'
/usr/src/sys/dev/pci/pci.c:1057: warning: nested extern declaration of `ACPI_PWR_FOR_SLEEP'
/usr/src/sys/dev/pci/pci.c: In function `pci_resume':
/usr/src/sys/dev/pci/pci.c:1089: warning: nested extern declaration of `ACPI_PWR_FOR_SLEEP'
/usr/src/sys/dev/pci/pci.c:1057: warning: redundant redeclaration of 'ACPI_PWR_FOR_SLEEP'
/usr/src/sys/dev/pci/pci.c:1057: warning: previous implicit declaration of 'ACPI_PWR_FOR_SLEEP' was here
*** Error code 1
Perhaps I should note that I have been setting hw.pci.do_powerstate to 1
for many months.
All sources are RELENG_5 as of noon today PST.
--
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman at es.net Phone: +1 510 486-8634
More information about the freebsd-acpi
mailing list