Date: Tue, 21 Jul 2015 15:56:48 -0700 From: John Baldwin <jhb@freebsd.org> To: Kevin Oberman <rkoberman@gmail.com> 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: <12509399.h3RdpFfE1l@ralph.baldwin.cx> In-Reply-To: <CAN6yY1ubQhsCMqXqV9Fp0M9bLRZGGg07qt0Z3KZNSaxW80GAOg@mail.gmail.com> References: <86oak289hv.fsf@gly.ftfl.ca> <86oaj9dnbo.fsf@gly.ftfl.ca> <CAN6yY1ubQhsCMqXqV9Fp0M9bLRZGGg07qt0Z3KZNSaxW80GAOg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?12509399.h3RdpFfE1l>
