linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: sathyanarayanan.kuppuswamy@linux.intel.com
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	ashok.raj@intel.com, keith.busch@intel.com,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>
Subject: Re: [PATCH v6 3/9] PCI/ACPI: Expose EDR support via _OSC to BIOS
Date: Thu, 15 Aug 2019 17:19:34 -0500	[thread overview]
Message-ID: <20190815221934.GK253360@google.com> (raw)
In-Reply-To: <c2841a077e304b3173e1c6f95f7fe488d1e15030.1564177080.git.sathyanarayanan.kuppuswamy@linux.intel.com>

On Fri, Jul 26, 2019 at 02:43:13PM -0700, sathyanarayanan.kuppuswamy@linux.intel.com wrote:
> From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
> 
> As per PCI firmware specification r3.2 Downstream Port Containment
> Related Enhancements ECN, sec 4.5.1, table 4-4, if OS supports EDR,
> it should expose its support to BIOS by setting bit 7 of _OSC Support
> Field.
> 
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Len Brown <lenb@kernel.org>
> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
> ---
>  drivers/acpi/pci_root.c | 3 +++
>  include/linux/acpi.h    | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
> index 73b08f40b0da..988d09d788b6 100644
> --- a/drivers/acpi/pci_root.c
> +++ b/drivers/acpi/pci_root.c
> @@ -132,6 +132,7 @@ static struct pci_osc_bit_struct pci_osc_support_bit[] = {
>  	{ OSC_PCI_CLOCK_PM_SUPPORT, "ClockPM" },
>  	{ OSC_PCI_SEGMENT_GROUPS_SUPPORT, "Segments" },
>  	{ OSC_PCI_MSI_SUPPORT, "MSI" },
> +	{ OSC_PCI_EDR_SUPPORT, "EDR" },
>  	{ OSC_PCI_HPX_TYPE_3_SUPPORT, "HPX-Type3" },
>  };
>  
> @@ -442,6 +443,8 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
>  		support |= OSC_PCI_ASPM_SUPPORT | OSC_PCI_CLOCK_PM_SUPPORT;
>  	if (pci_msi_enabled())
>  		support |= OSC_PCI_MSI_SUPPORT;
> +	if (IS_ENABLED(CONFIG_PCIE_EDR))
> +		support |= OSC_PCI_EDR_SUPPORT;

Do we really support it here?  This is patch [3/9] and it looks like
patch [6/9] might be where EDR support really gets added.  It's good
to split changes into small pieces, but only if each piece is
logically self-contained.

>  	decode_osc_support(root, "OS supports", support);
>  	status = acpi_pci_osc_support(root, support);
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index 8959ed322e15..b6b43da85d26 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -515,6 +515,7 @@ extern bool osc_pc_lpi_support_confirmed;
>  #define OSC_PCI_CLOCK_PM_SUPPORT		0x00000004
>  #define OSC_PCI_SEGMENT_GROUPS_SUPPORT		0x00000008
>  #define OSC_PCI_MSI_SUPPORT			0x00000010
> +#define OSC_PCI_EDR_SUPPORT			0x00000080
>  #define OSC_PCI_HPX_TYPE_3_SUPPORT		0x00000100
>  #define OSC_PCI_SUPPORT_MASKS			0x0000011f

You defined a new bit above but didn't update OSC_PCI_SUPPORT_MASKS to
include that bit.  This looks broken.

  reply	other threads:[~2019-08-15 22:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26 21:43 [PATCH v6 0/9] Add Error Disconnect Recover (EDR) support sathyanarayanan.kuppuswamy
2019-07-26 21:43 ` [PATCH v6 1/9] PCI/ERR: Update error status after reset_link() sathyanarayanan.kuppuswamy
2019-08-15 22:16   ` Bjorn Helgaas
2019-08-15 22:52     ` Kuppuswamy Sathyanarayanan
2019-08-16  1:54     ` Joe Perches
2019-07-26 21:43 ` [PATCH v6 2/9] PCI/ACPI: Add _OSC based negotiation support for DPC sathyanarayanan.kuppuswamy
2019-08-15 22:17   ` Bjorn Helgaas
2019-08-15 23:44     ` Kuppuswamy Sathyanarayanan
2019-07-26 21:43 ` [PATCH v6 3/9] PCI/ACPI: Expose EDR support via _OSC to BIOS sathyanarayanan.kuppuswamy
2019-08-15 22:19   ` Bjorn Helgaas [this message]
2019-08-15 23:46     ` Kuppuswamy Sathyanarayanan
2019-07-26 21:43 ` [PATCH v6 4/9] PCI/DPC: Allow dpc_probe() even if firmware first mode is enabled sathyanarayanan.kuppuswamy
2019-07-26 21:43 ` [PATCH v6 5/9] PCI/DPC: Add dpc_process_error() wrapper function sathyanarayanan.kuppuswamy
2019-07-26 21:43 ` [PATCH v6 6/9] PCI/DPC: Add Error Disconnect Recover (EDR) support sathyanarayanan.kuppuswamy
2019-07-26 21:43 ` [PATCH v6 7/9] PCI/AER: Allow clearing Error Status Register in FF mode sathyanarayanan.kuppuswamy
2019-07-26 21:43 ` [PATCH v6 8/9] PCI/DPC: Update comments related to DPC recovery on NON_FATAL errors sathyanarayanan.kuppuswamy
2019-07-26 21:43 ` [PATCH v6 9/9] PCI/DPC: Clear AER registers in EDR mode sathyanarayanan.kuppuswamy
2019-07-26 21:53 ` [PATCH v6 0/9] Add Error Disconnect Recover (EDR) support Keith Busch
2019-07-26 23:31   ` sathyanarayanan kuppuswamy
2019-07-27  0:34     ` Austin.Bolen
2019-07-28 16:10     ` Huong.Nguyen

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=20190815221934.GK253360@google.com \
    --to=helgaas@kernel.org \
    --cc=ashok.raj@intel.com \
    --cc=keith.busch@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    /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 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).