From: "Derrick, Jonathan" <jonathan.derrick@intel.com>
To: "sathyanarayanan.kuppuswamy@linux.intel.com"
<sathyanarayanan.kuppuswamy@linux.intel.com>,
"helgaas@kernel.org" <helgaas@kernel.org>
Cc: "bhelgaas@google.com" <bhelgaas@google.com>,
"fred@fredlawl.com" <fred@fredlawl.com>,
"sbobroff@linux.ibm.com" <sbobroff@linux.ibm.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kbusch@kernel.org" <kbusch@kernel.org>,
"oohall@gmail.com" <oohall@gmail.com>,
"olof@lixom.net" <olof@lixom.net>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] PCI/DPC: Allow Non-ACPI Native ports to use DPC
Date: Thu, 16 Apr 2020 20:50:06 +0000 [thread overview]
Message-ID: <94fcbe2c950f9cff45c759b8598af985235ab932.camel@intel.com> (raw)
In-Reply-To: <4c2bf639-5510-fb17-2f02-73e7016d8f70@linux.intel.com>
On Thu, 2020-04-16 at 13:32 -0700, Kuppuswamy, Sathyanarayanan wrote:
> Hi,
>
> On 4/16/20 12:59 PM, Jon Derrick wrote:
> > Some platforms have a mix of ports whose capabilities can be negotiated
> > by _OSC, and some ports which are not described by ACPI and instead
> > managed by Native drivers. The existing Firmware-First HEST model can
> > incorrectly tag these Native, Non-ACPI ports as Firmware-First capable
> > ports by advertising the HEST Global flag and specifying the type and
> > class (aer_hest_parse).
> >
> > This ultimately can lead to bad situations if the BIOS or port firmware
> > leaves DPC preconfigured and the Linux DPC driver is unable to bind to
> > the port to handle DPC events.
> >
> > This patch adds the check for Native DPC in the port's host bridge in
> > order to allow DPC services to bind to the port.
> >
> > Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
> > ---
> > drivers/pci/pcie/dpc.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c
> > index 7621704..a1e355d 100644
> > --- a/drivers/pci/pcie/dpc.c
> > +++ b/drivers/pci/pcie/dpc.c
> > @@ -281,10 +281,12 @@ static int dpc_probe(struct pcie_device *dev)
> > {
> > struct pci_dev *pdev = dev->port;
> > struct device *device = &dev->device;
> > + struct pci_host_bridge *host = pci_find_host_bridge(pdev->bus);
> > int status;
> > u16 ctl, cap;
> >
> > - if (pcie_aer_get_firmware_first(pdev) && !pcie_ports_dpc_native)
> > + if (pcie_aer_get_firmware_first(pdev) && !pcie_ports_dpc_native &&
> For other PCIe services, this check is added in
> get_port_device_capability().
> Why not add it there for DPC as well ?
Sure. Looking at this, it seems like it needs some more de-tangling to
fit into my model.
> > + !host->native_dpc)
> > return -ENOTSUPP;
> >
> > status = devm_request_threaded_irq(device, dev->irq, dpc_irq,
> >
prev parent reply other threads:[~2020-04-16 20:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 19:59 [PATCH] PCI/DPC: Allow Non-ACPI Native ports to use DPC Jon Derrick
2020-04-16 20:32 ` Kuppuswamy, Sathyanarayanan
2020-04-16 20:50 ` Derrick, Jonathan [this message]
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=94fcbe2c950f9cff45c759b8598af985235ab932.camel@intel.com \
--to=jonathan.derrick@intel.com \
--cc=bhelgaas@google.com \
--cc=fred@fredlawl.com \
--cc=helgaas@kernel.org \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=olof@lixom.net \
--cc=oohall@gmail.com \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=sbobroff@linux.ibm.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).