linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] PCI / ACPI: Do not request control of ASPM if the BIOS has disabled it
  2012-05-24 20:45 [PATCH] PCI / ACPI: Do not request control of ASPM if the BIOS has disabled it Rafael J. Wysocki
@ 2012-05-24 20:45 ` Matthew Garrett
  2012-05-25 11:53   ` Jean Delvare
  2012-08-15 19:47 ` Bjorn Helgaas
  1 sibling, 1 reply; 5+ messages in thread
From: Matthew Garrett @ 2012-05-24 20:45 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Bjorn Helgaas, ACPI Devel Mailing List, LKML, linux-pci,
	Len Brown, Wei Kong, Jean Delvare

On Thu, May 24, 2012 at 10:45:45PM +0200, Rafael J. Wysocki wrote:

> However, knowing that the BIOS doesn't support ASPM, we shouldn't
> request the control of it, so we should remove
> (OSC_ACTIVE_STATE_PWR_SUPPORT | OSC_CLOCK_PWR_CAPABILITY_SUPPORT)
> from the flags before calling acpi_pci_osc_control_set() in those
> cases.  Failing to do so causes the evaluation of _OSC for the PCI
> root bridge to return error codes on some systems where it should
> work correctly.

Is there an example of an affected machine's DSDT?

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] PCI / ACPI: Do not request control of ASPM if the BIOS has disabled it
@ 2012-05-24 20:45 Rafael J. Wysocki
  2012-05-24 20:45 ` Matthew Garrett
  2012-08-15 19:47 ` Bjorn Helgaas
  0 siblings, 2 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2012-05-24 20:45 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: ACPI Devel Mailing List, LKML, linux-pci, Len Brown, Wei Kong,
	Jean Delvare, Matthew Garrett

From: Rafael J. Wysocki <rjw@sisk.pl>

We want to report that the kernel supports ASPM to the BIOS even if
the BIOS signals us that it doesn't.  So, we need the flags to include
(OSC_ACTIVE_STATE_PWR_SUPPORT | OSC_CLOCK_PWR_CAPABILITY_SUPPORT)
before calling acpi_pci_osc_support(root, flags) in
acpi_pci_root_add() (unless there's a command line telling us that
ASPM is not to be supported).

However, knowing that the BIOS doesn't support ASPM, we shouldn't
request the control of it, so we should remove
(OSC_ACTIVE_STATE_PWR_SUPPORT | OSC_CLOCK_PWR_CAPABILITY_SUPPORT)
from the flags before calling acpi_pci_osc_control_set() in those
cases.  Failing to do so causes the evaluation of _OSC for the PCI
root bridge to return error codes on some systems where it should
work correctly.

Reported-and-tested-by: Wei Kong <wkong@novell.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---

-stable material, I think.

Thanks,
Rafael

---
 drivers/acpi/pci_root.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: linux/drivers/acpi/pci_root.c
===================================================================
--- linux.orig/drivers/acpi/pci_root.c
+++ linux/drivers/acpi/pci_root.c
@@ -574,6 +574,10 @@ static int __devinit acpi_pci_root_add(s
 	if (flags != base_flags)
 		acpi_pci_osc_support(root, flags);
 
+	if (!pcie_aspm_enabled())
+		flags &= ~(OSC_ACTIVE_STATE_PWR_SUPPORT |
+			OSC_CLOCK_PWR_CAPABILITY_SUPPORT);
+
 	if (!pcie_ports_disabled
 	    && (flags & ACPI_PCIE_REQ_SUPPORT) == ACPI_PCIE_REQ_SUPPORT) {
 		flags = OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PCI / ACPI: Do not request control of ASPM if the BIOS has disabled it
  2012-05-24 20:45 ` Matthew Garrett
@ 2012-05-25 11:53   ` Jean Delvare
  0 siblings, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2012-05-25 11:53 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Rafael J. Wysocki, Bjorn Helgaas, ACPI Devel Mailing List, LKML,
	linux-pci, Len Brown, Wei Kong

[-- Attachment #1: Type: text/plain, Size: 645 bytes --]

Hi Matthew,

Le jeudi 24 mai 2012 à 21:45 +0100, Matthew Garrett a écrit :
> On Thu, May 24, 2012 at 10:45:45PM +0200, Rafael J. Wysocki wrote:
> 
> > However, knowing that the BIOS doesn't support ASPM, we shouldn't
> > request the control of it, so we should remove
> > (OSC_ACTIVE_STATE_PWR_SUPPORT | OSC_CLOCK_PWR_CAPABILITY_SUPPORT)
> > from the flags before calling acpi_pci_osc_control_set() in those
> > cases.  Failing to do so causes the evaluation of _OSC for the PCI
> > root bridge to return error codes on some systems where it should
> > work correctly.
> 
> Is there an example of an affected machine's DSDT?

Attached.

Jean


[-- Attachment #2: DSDT.dat --]
[-- Type: application/octet-stream, Size: 44403 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PCI / ACPI: Do not request control of ASPM if the BIOS has disabled it
  2012-05-24 20:45 [PATCH] PCI / ACPI: Do not request control of ASPM if the BIOS has disabled it Rafael J. Wysocki
  2012-05-24 20:45 ` Matthew Garrett
@ 2012-08-15 19:47 ` Bjorn Helgaas
  2012-08-15 20:03   ` Rafael J. Wysocki
  1 sibling, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2012-08-15 19:47 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown
  Cc: ACPI Devel Mailing List, LKML, linux-pci, Wei Kong, Jean Delvare,
	Matthew Garrett

On Thu, May 24, 2012 at 2:45 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> From: Rafael J. Wysocki <rjw@sisk.pl>
>
> We want to report that the kernel supports ASPM to the BIOS even if
> the BIOS signals us that it doesn't.  So, we need the flags to include
> (OSC_ACTIVE_STATE_PWR_SUPPORT | OSC_CLOCK_PWR_CAPABILITY_SUPPORT)
> before calling acpi_pci_osc_support(root, flags) in
> acpi_pci_root_add() (unless there's a command line telling us that
> ASPM is not to be supported).
>
> However, knowing that the BIOS doesn't support ASPM, we shouldn't
> request the control of it, so we should remove
> (OSC_ACTIVE_STATE_PWR_SUPPORT | OSC_CLOCK_PWR_CAPABILITY_SUPPORT)
> from the flags before calling acpi_pci_osc_control_set() in those
> cases.  Failing to do so causes the evaluation of _OSC for the PCI
> root bridge to return error codes on some systems where it should
> work correctly.
>
> Reported-and-tested-by: Wei Kong <wkong@novell.com>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
>
> -stable material, I think.

Len, since you've applied recent patches in this area, can you take
care of this, too?

> ---
>  drivers/acpi/pci_root.c |    4 ++++
>  1 file changed, 4 insertions(+)
>
> Index: linux/drivers/acpi/pci_root.c
> ===================================================================
> --- linux.orig/drivers/acpi/pci_root.c
> +++ linux/drivers/acpi/pci_root.c
> @@ -574,6 +574,10 @@ static int __devinit acpi_pci_root_add(s
>         if (flags != base_flags)
>                 acpi_pci_osc_support(root, flags);
>
> +       if (!pcie_aspm_enabled())
> +               flags &= ~(OSC_ACTIVE_STATE_PWR_SUPPORT |
> +                       OSC_CLOCK_PWR_CAPABILITY_SUPPORT);
> +
>         if (!pcie_ports_disabled
>             && (flags & ACPI_PCIE_REQ_SUPPORT) == ACPI_PCIE_REQ_SUPPORT) {
>                 flags = OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PCI / ACPI: Do not request control of ASPM if the BIOS has disabled it
  2012-08-15 19:47 ` Bjorn Helgaas
@ 2012-08-15 20:03   ` Rafael J. Wysocki
  0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2012-08-15 20:03 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Len Brown, ACPI Devel Mailing List, LKML, linux-pci, Wei Kong,
	Jean Delvare, Matthew Garrett

On Wednesday, August 15, 2012, Bjorn Helgaas wrote:
> On Thu, May 24, 2012 at 2:45 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > We want to report that the kernel supports ASPM to the BIOS even if
> > the BIOS signals us that it doesn't.  So, we need the flags to include
> > (OSC_ACTIVE_STATE_PWR_SUPPORT | OSC_CLOCK_PWR_CAPABILITY_SUPPORT)
> > before calling acpi_pci_osc_support(root, flags) in
> > acpi_pci_root_add() (unless there's a command line telling us that
> > ASPM is not to be supported).
> >
> > However, knowing that the BIOS doesn't support ASPM, we shouldn't
> > request the control of it, so we should remove
> > (OSC_ACTIVE_STATE_PWR_SUPPORT | OSC_CLOCK_PWR_CAPABILITY_SUPPORT)
> > from the flags before calling acpi_pci_osc_control_set() in those
> > cases.  Failing to do so causes the evaluation of _OSC for the PCI
> > root bridge to return error codes on some systems where it should
> > work correctly.
> >
> > Reported-and-tested-by: Wei Kong <wkong@novell.com>
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > ---
> >
> > -stable material, I think.
> 
> Len, since you've applied recent patches in this area, can you take
> care of this, too?

No, please don't.

I'd discussed that with Matthew and we concluded that it would break things
sometimes.  Please disregard it (and sorry for not saying that earlier).

Thanks,
Rafael


> > ---
> >  drivers/acpi/pci_root.c |    4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > Index: linux/drivers/acpi/pci_root.c
> > ===================================================================
> > --- linux.orig/drivers/acpi/pci_root.c
> > +++ linux/drivers/acpi/pci_root.c
> > @@ -574,6 +574,10 @@ static int __devinit acpi_pci_root_add(s
> >         if (flags != base_flags)
> >                 acpi_pci_osc_support(root, flags);
> >
> > +       if (!pcie_aspm_enabled())
> > +               flags &= ~(OSC_ACTIVE_STATE_PWR_SUPPORT |
> > +                       OSC_CLOCK_PWR_CAPABILITY_SUPPORT);
> > +
> >         if (!pcie_ports_disabled
> >             && (flags & ACPI_PCIE_REQ_SUPPORT) == ACPI_PCIE_REQ_SUPPORT) {
> >                 flags = OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-15 19:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-24 20:45 [PATCH] PCI / ACPI: Do not request control of ASPM if the BIOS has disabled it Rafael J. Wysocki
2012-05-24 20:45 ` Matthew Garrett
2012-05-25 11:53   ` Jean Delvare
2012-08-15 19:47 ` Bjorn Helgaas
2012-08-15 20:03   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).