public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew W Carlis <mattc@purestorage.com>
To: sathyanarayanan.kuppuswamy@linux.intel.com
Cc: bhelgaas@google.com, helgaas@kernel.org, kbusch@kernel.org,
	linux-pci@vger.kernel.org, lukas@wunner.de,
	mattc@purestorage.com, mika.westerberg@linux.intel.com
Subject: [PATCH 1/1] PCI/portdrv: Allow DPC if the OS controls AER natively
Date: Wed, 10 Jan 2024 12:59:29 -0700	[thread overview]
Message-ID: <20240110195929.5775-1-mattc@purestorage.com> (raw)
In-Reply-To: <65c81900-cec6-4d3a-b2fe-bb8169ee701c@linux.intel.com>

On 1/10/2024 8:41 AM, Kuppuswamy Sathyanarayanan wrote:
> Since your kernel has EDR source support, why not enable
> the relevant config? or did I not understand the issue correctly?

As I had said we never intend to use EDR or firmware controlled DPC. Why should
I have to build in more code that I wouldn't use? I'm not sure that we're
both using the same lense to consider how & whether _OSC DPC Control supports
the old world of DPC. i.e OS never required firmware's permission to control
DPC & it was not tied to EDR. I wish I had been working in this area at the
time they were drafting the 2019 FW ECN then I might have known to try & influence
its details.

I think the first & primary problem for the kernel here is not treating root
ports & switch ports the same when deciding to use DPC. I would like to hear
from Bjorn first, but I guess I could be open to just relying on the cli
pcie_ports=dpc-native field if there is reason for the kernel to only support
the latest additions of the PCIe FW DPC ECN by default. In this case the patch
would look as the one in Bjorns response on Dec 28 2023 at 1:23PM, included
again below. We may find others who are using Root Port DPC now needing to
change their config to support EDR or use the cli pcie_ports=dpc-native as
a result however.

If this is the route that makes the most sense, I can update my patch & resubmit
as below if that is ok. Perhaps there might also be some docs/notes to be created
around all of this.

-Matt

diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c
index 14a4b89a3b83..423dadd6727e 100644
--- a/drivers/pci/pcie/portdrv.c
+++ b/drivers/pci/pcie/portdrv.c
@@ -262,7 +262,7 @@ static int get_port_device_capability(struct pci_dev *dev)
         */
        if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC) &&
            pci_aer_available() &&
-           (pcie_ports_dpc_native || (services & PCIE_PORT_SERVICE_AER)))
+           (pcie_ports_dpc_native || host->native_dpc))


  parent reply	other threads:[~2024-01-10 19:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-23 21:22 [PATCH 1/1] PCI/portdrv: Allow DPC if the OS controls AER natively Matthew W Carlis
2023-12-23 21:22 ` Matthew W Carlis
2023-12-25 17:53   ` kernel test robot
2023-12-25 20:36   ` kernel test robot
2023-12-26  0:02     ` Matthew W Carlis
2023-12-28 21:23   ` Bjorn Helgaas
2024-01-02 15:41     ` Kuppuswamy Sathyanarayanan
2024-01-08 19:46       ` Matthew W Carlis
2024-01-08 19:53         ` Kuppuswamy Sathyanarayanan
2024-01-09  0:15           ` Matthew W Carlis
2024-01-10 16:41             ` Kuppuswamy Sathyanarayanan
2024-01-10 17:13               ` Kuppuswamy Sathyanarayanan
2024-01-10 20:01                 ` Matthew W Carlis
2024-01-10 19:59               ` Matthew W Carlis [this message]
2024-01-22 19:32             ` Bjorn Helgaas
2024-01-23  2:37               ` Kuppuswamy Sathyanarayanan
2024-01-23 15:59                 ` Bjorn Helgaas
2024-01-23 23:18                   ` Matthew W Carlis
2024-01-24 20:29                     ` Bjorn Helgaas
2024-02-21 23:11                   ` Bjorn Helgaas
2024-02-21 23:33                     ` Bjorn Helgaas

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=20240110195929.5775-1-mattc@purestorage.com \
    --to=mattc@purestorage.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=kbusch@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mika.westerberg@linux.intel.com \
    --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