From owner-freebsd-stable@freebsd.org Thu Jul 23 05:46:32 2015 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F01C9A61AC for ; Thu, 23 Jul 2015 05:46:32 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-oi0-x235.google.com (mail-oi0-x235.google.com [IPv6:2607:f8b0:4003:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E7BAC1924; Thu, 23 Jul 2015 05:46:31 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by oigd21 with SMTP id d21so116234383oig.1; Wed, 22 Jul 2015 22:46:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=E5ZT2kgUhQwSpiQejdRk2X96eSlL738oNmYzQgTtrJM=; b=dm9ZxSk4cRw85Nh/eAgzKLITW+qGtO++ofYmEXE/kwf2aeb0tU3ok/anF14UPUru55 qmTglPTVlvfFpB8zvbWJn7l+81Wx5xZ81nMDKxmAUb4XHbSgeZvs9333kIy6ZJcFbqTb 3N3ofYfdzPu9tS0zi5+5YfhlukaR45FyO5pOPP6pEwKWLhMNVeOgvPGE48bQIGtbKbCK HmulgKULAi6Kc855bi8Y6/wF7DeNWgUBNk+cxXR4Z1AA45u8Vypr6+UQd+Ol7NJr69FJ 1RMA9GQX5mE+c6r/t9ODdKrrfWPIpfzrY5lC9/mYNQ3KEF2k+Fx4ypZ2zT4VLY9+QmnN 8rZQ== MIME-Version: 1.0 X-Received: by 10.202.188.2 with SMTP id m2mr4839956oif.59.1437630391280; Wed, 22 Jul 2015 22:46:31 -0700 (PDT) Sender: kob6558@gmail.com Received: by 10.202.221.69 with HTTP; Wed, 22 Jul 2015 22:46:31 -0700 (PDT) In-Reply-To: <12509399.h3RdpFfE1l@ralph.baldwin.cx> References: <86oak289hv.fsf@gly.ftfl.ca> <86oaj9dnbo.fsf@gly.ftfl.ca> <12509399.h3RdpFfE1l@ralph.baldwin.cx> Date: Wed, 22 Jul 2015 22:46:31 -0700 X-Google-Sender-Auth: VJtjJesduwLjk1YIoGgjFc4i1UE Message-ID: Subject: Re: suspend/resume regression From: Kevin Oberman To: John Baldwin Cc: Joseph Mingrone , "Brandon J. Wandersee" , Adrian Chadd , FreeBSD-STABLE Mailing List Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2015 05:46:32 -0000 On Tue, Jul 21, 2015 at 3:56 PM, John Baldwin 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