Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jul 2015 22:46:31 -0700
From:      Kevin Oberman <rkoberman@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Joseph Mingrone <jrm@ftfl.ca>, "Brandon J. Wandersee" <brandon.wandersee@gmail.com>,  Adrian Chadd <adrian.chadd@gmail.com>,  FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>
Subject:   Re: suspend/resume regression
Message-ID:  <CAN6yY1vaxDd6raCf5p%2BFh5Pw%2BYhHUc9VwRA258roAadozdRLuw@mail.gmail.com>
In-Reply-To: <12509399.h3RdpFfE1l@ralph.baldwin.cx>
References:  <86oak289hv.fsf@gly.ftfl.ca> <86oaj9dnbo.fsf@gly.ftfl.ca> <CAN6yY1ubQhsCMqXqV9Fp0M9bLRZGGg07qt0Z3KZNSaxW80GAOg@mail.gmail.com> <12509399.h3RdpFfE1l@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 21, 2015 at 3:56 PM, John Baldwin <jhb@freebsd.org> wrote:

> On Saturday, July 18, 2015 10:22:33 PM Kevin Oberman wrote:
> > I just confirmed that my system resumes on HEAD of July 16 but fails on
> > 10.2-BETA2. So the problem limited to 10. I'm guessing that some other
> > change made to pci that has not been MFCed is the cause, but it is only
> > causing a problem on some hardware. I have seen no reports about systems
> > other than Lenovo systems.
>
> So my x220 does fail with a USB disk on 10, but I also get a weird behavior
> where it seems to wake up (disk lights up) and then goes back to sleep and
> never resumes again.  I'm not sure if this is due to using a USB disk or
> not.  I get the same result when I disable power management during suspend
> which was reported to fix other laptops IIRC.
>
> Please try this:
>
> Index: sys/dev/acpica/acpi.c
> ===================================================================
> --- sys/dev/acpica/acpi.c       (revision 285761)
> +++ sys/dev/acpica/acpi.c       (working copy)
> @@ -691,7 +691,7 @@
>  static void
>  acpi_set_power_children(device_t dev, int state)
>  {
> -       device_t child, parent;
> +       device_t child;
>         device_t *devlist;
>         struct pci_devinfo *dinfo;
>         int dstate, i, numdevs;
> @@ -703,13 +703,12 @@
>          * Retrieve and set D-state for the sleep state if _SxD is present.
>          * Skip children who aren't attached since they are handled
> separately.
>          */
> -       parent = device_get_parent(dev);
>         for (i = 0; i < numdevs; i++) {
>                 child = devlist[i];
>                 dinfo = device_get_ivars(child);
>                 dstate = state;
>                 if (device_is_attached(child) &&
> -                   acpi_device_pwr_for_sleep(parent, dev, &dstate) == 0)
> +                   acpi_device_pwr_for_sleep(dev, child, &dstate) == 0)
>                         acpi_set_powerstate(child, dstate);
>         }
>         free(devlist, M_TEMP);
> Index: sys/dev/pci/pci.c
> ===================================================================
> --- sys/dev/pci/pci.c   (revision 285761)
> +++ sys/dev/pci/pci.c   (working copy)
> @@ -3671,7 +3671,7 @@
>                 child = devlist[i];
>                 dstate = state;
>                 if (device_is_attached(child) &&
> -                   PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0)
> +                   PCIB_POWER_FOR_SLEEP(pcib, child, &dstate) == 0)
>                         pci_set_powerstate(child, dstate);
>         }
>  }
> Index: .
> ===================================================================
> --- .   (revision 285761)
> +++ .   (working copy)
>
> Property changes on: .
> ___________________________________________________________________
> Modified: svn:mergeinfo
>    Merged /head:r274386,274397
>
>
> --
> John Baldwin
>

Tried both sysctls and the patch. Nothing worked. Ticket updated with the
information.
--
Kevin Oberman, Network Engineer, Retired
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1vaxDd6raCf5p%2BFh5Pw%2BYhHUc9VwRA258roAadozdRLuw>