All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Oleksij Rempel (fishor)" <bug-track@fisher-privat.net>,
	Bjorn Helgaas <bhelgaas@google.com>, Len Brown <lenb@kernel.org>,
	ACPI Devel Mailing List <linux-acpi@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	linux-pci@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Andrey Rahmatullin <wrar@wrar.name>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] ACPI / PCI: Make _SxD/_SxW check follow ACPI 4.0a spec
Date: Tue, 1 May 2012 10:11:41 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1205011004030.1499-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <201205011604.16556.rjw@sisk.pl>

On Tue, 1 May 2012, Rafael J. Wysocki wrote:

> > I mean not just the mapping.
> > I mean PCI:PME_SUP field.  If it PME(D0+,D1-,D2-,D3hot+,D3cold+), and 
> > acpi trying to avoid D3 states for this device. then is is same like 
> > PME(D0+,D1-,D2-)? Or not?
> 
> Yes, if _S3D or _S3W are present.  If they are not present and _PRW is,
> that means "don't care".
> 
> > According to spec.:
> > 7.2 Device Power Management Objects (page 287)
> > _S3D - Highest D-state supported by the device in the S3 state
> > _S3W - Lowest D-state supported by the device in the S3 state which can 
> > wake the system.
> > by definition if _S3W is specified then we can assume, the device can 
> > wake? But _SxW is not defined.
> 
> The device can wake up the system if _PRW is present for it (and for
> PCIe devices even that is not formally necessary).
> 
> > Are there any other method to forbid the system use broken state, after 
> > device was actually produced? Usual BIOS flash utility will probably no 
> > rewrite the PCIs EEPROM. Only hope is ACPI, what is correct method to do 
> > define it by ACPI?
> 
> Define _S3D that will return 2 (for example) and _PRW returning 3 as the
> deepest sleep state the system may be woken up from.  Then, we'll use
> D2 (after the @subject patch).
> 
> The drawback is that the kernel will then think the device can wake up
> the system.

There also remains a question about runtime power states and resume.

Oleksij, with your patch, which state does the controller get put into
during runtime suspend, D2 or D3?  (You may need to enable runtime
suspend by doing

	echo auto >/sys/bus/pci/devices/0000:00:1d.0/power/control

in order to test this.)  And if the controller is in runtime suspend,
does it resume correctly when you plug in a new USB device?

I'm pretty sure that without the patch, the controller gets put into D3 
and resume does work.

Alan Stern


WARNING: multiple messages have this Message-ID (diff)
From: Alan Stern <stern@rowland.harvard.edu>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Oleksij Rempel (fishor)" <bug-track@fisher-privat.net>,
	Bjorn Helgaas <bhelgaas@google.com>, Len Brown <lenb@kernel.org>,
	ACPI Devel Mailing List <linux-acpi@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	<linux-pci@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Andrey Rahmatullin <wrar@wrar.name>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] ACPI / PCI: Make _SxD/_SxW check follow ACPI 4.0a spec
Date: Tue, 1 May 2012 10:11:41 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1205011004030.1499-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <201205011604.16556.rjw@sisk.pl>

On Tue, 1 May 2012, Rafael J. Wysocki wrote:

> > I mean not just the mapping.
> > I mean PCI:PME_SUP field.  If it PME(D0+,D1-,D2-,D3hot+,D3cold+), and 
> > acpi trying to avoid D3 states for this device. then is is same like 
> > PME(D0+,D1-,D2-)? Or not?
> 
> Yes, if _S3D or _S3W are present.  If they are not present and _PRW is,
> that means "don't care".
> 
> > According to spec.:
> > 7.2 Device Power Management Objects (page 287)
> > _S3D - Highest D-state supported by the device in the S3 state
> > _S3W - Lowest D-state supported by the device in the S3 state which can 
> > wake the system.
> > by definition if _S3W is specified then we can assume, the device can 
> > wake? But _SxW is not defined.
> 
> The device can wake up the system if _PRW is present for it (and for
> PCIe devices even that is not formally necessary).
> 
> > Are there any other method to forbid the system use broken state, after 
> > device was actually produced? Usual BIOS flash utility will probably no 
> > rewrite the PCIs EEPROM. Only hope is ACPI, what is correct method to do 
> > define it by ACPI?
> 
> Define _S3D that will return 2 (for example) and _PRW returning 3 as the
> deepest sleep state the system may be woken up from.  Then, we'll use
> D2 (after the @subject patch).
> 
> The drawback is that the kernel will then think the device can wake up
> the system.

There also remains a question about runtime power states and resume.

Oleksij, with your patch, which state does the controller get put into
during runtime suspend, D2 or D3?  (You may need to enable runtime
suspend by doing

	echo auto >/sys/bus/pci/devices/0000:00:1d.0/power/control

in order to test this.)  And if the controller is in runtime suspend,
does it resume correctly when you plug in a new USB device?

I'm pretty sure that without the patch, the controller gets put into D3 
and resume does work.

Alan Stern


  reply	other threads:[~2012-05-01 14:11 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-29 20:44 [PATCH] ACPI / PCI: Make _SxD/_SxW check follow ACPI 4.0a spec Rafael J. Wysocki
2012-04-30 16:03 ` Bjorn Helgaas
2012-04-30 17:53   ` Alan Stern
2012-04-30 17:53     ` Alan Stern
2012-04-30 21:30     ` Oleksij Rempel
2012-04-30 21:43       ` Rafael J. Wysocki
2012-05-01  6:38         ` Oleksij Rempel (fishor)
2012-05-01 14:04           ` Rafael J. Wysocki
2012-05-01 14:04             ` Rafael J. Wysocki
2012-05-01 14:11             ` Alan Stern [this message]
2012-05-01 14:11               ` Alan Stern
2012-05-01 16:27               ` Oleksij Rempel (fishor)
2012-05-01 16:59                 ` Alan Stern
2012-05-01 16:59                   ` Alan Stern
2012-05-02  4:10                   ` Oleksij Rempel (fishor)
2012-05-25 19:15                     ` Alan Stern
2012-05-25 20:00                       ` Rafael J. Wysocki
2012-05-26  6:03                         ` Oleksij Rempel (fishor)
2012-05-26  8:15                           ` Oleksij Rempel
2012-05-26 20:21                             ` Rafael J. Wysocki
2012-04-30 21:32     ` Rafael J. Wysocki
2012-04-30 21:32       ` Rafael J. Wysocki
2012-04-30 21:41   ` Rafael J. Wysocki
2012-04-30 21:38     ` Bjorn Helgaas
2012-04-30 21:38       ` Bjorn Helgaas
2012-05-10 20:14     ` Rafael J. Wysocki
2012-05-10 20:14       ` Rafael J. Wysocki
2012-07-11  0:08 ` Greg KH
2012-07-11  9:07   ` Rafael J. Wysocki
2012-07-11 13:53     ` Greg KH
2012-07-11 19:04       ` Rafael J. Wysocki
2012-07-11 19:20         ` Greg KH
2012-07-11 19:29           ` Rafael J. Wysocki
2012-07-12  4:30         ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44L0.1205011004030.1499-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=bhelgaas@google.com \
    --cc=bug-track@fisher-privat.net \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=rostedt@goodmis.org \
    --cc=wrar@wrar.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.