From: Walter Alejandro Iglesias Subject: Re: Thinkpad t410 does not reboot properly To: Mark Kettenis Cc: acamari@verlet.org, tech@openbsd.org Date: Sun, 9 Jun 2024 21:44:19 +0200 Hello Mark, Your diff works, thank you very much. (Also thanks to Aldo and Stuart for teaching me how to do the tests.) On Sun, Jun 09, 2024 at 08:12:21PM +0200, Mark Kettenis wrote: > > Date: Sun, 09 Jun 2024 20:02:11 +0200 > > From: Mark Kettenis > > > > > From: Abel Abraham Camarillo Ojeda > > > Date: Sun, 9 Jun 2024 05:42:32 -0600 > > > > > revision 1.430 > > > date: 2024/06/02 11:08:41; author: kettenis; state: Exp; lines: +9 -1; > > > commitid: McNWbgdeepOyZIw5; > > > Power down PCI devices in S0 as well. Needed for suspend-to-idle. > > > > > > ok mglocker@ > > > > That may very well be the diff that broke things. > > > > Possible fix below. > > Wrong diff. This one actually builds: > > Index: dev/acpi/acpi.c > =================================================================== > RCS file: /cvs/src/sys/dev/acpi/acpi.c,v > retrieving revision 1.430 > diff -u -p -r1.430 acpi.c > --- dev/acpi/acpi.c 2 Jun 2024 11:08:41 -0000 1.430 > +++ dev/acpi/acpi.c 9 Jun 2024 18:04:01 -0000 > @@ -26,6 +26,7 @@ > #include > #include > #include > +#include > #include > > #include > @@ -726,8 +727,10 @@ acpi_pci_min_powerstate(pci_chipset_tag_ > if (pdev->bus == bus && pdev->dev == dev && pdev->fun == fun) { > switch (acpi_softc->sc_state) { > case ACPI_STATE_S0: > - defaultstate = PCI_PMCSR_STATE_D3; > - state = pdev->_s0w; > + if (boothowto & RB_POWERDOWN) { > + defaultstate = PCI_PMCSR_STATE_D3; > + state = pdev->_s0w; > + } > break; > case ACPI_STATE_S3: > defaultstate = PCI_PMCSR_STATE_D3; > -- Walter