suspend/resume regression
John Baldwin
jhb at freebsd.org
Wed Jul 22 17:00:10 UTC 2015
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
More information about the freebsd-stable
mailing list