From: Bjorn Helgaas <helgaas@kernel.org>
To: Sinan Kaya <okaya@codeaurora.org>
Cc: linux-pci@vger.kernel.org, timur@codeaurora.org,
cov@codeaurora.org, izumi.taku@jp.fujitsu.com, jcm@redhat.com,
Bjorn Helgaas <bhelgaas@google.com>,
Yijing Wang <wangyijing@huawei.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] PCI/AER: enable SERR# forwarding for bridges and switches
Date: Mon, 28 Dec 2015 16:29:28 -0600 [thread overview]
Message-ID: <20151228222927.GA15808@localhost> (raw)
In-Reply-To: <566F08EF.5010904@codeaurora.org>
Hi Sinan,
Sorry for the delay in responding; I was on vacation when you sent
this, and I missed it when I returned.
On Mon, Dec 14, 2015 at 01:22:39PM -0500, Sinan Kaya wrote:
> On 12/11/2015 6:30 PM, Sinan Kaya wrote:
> >> I think the best way to fix all the cases would be to do something in
> >> > in pci_configure_device(). Then we could drop the AER bus walk in
> >> > set_downstream_devices_error_reporting(). A bus walk like that is
> >> > always an issue for hotplug.
> >> >
> > Let me read some code.
>
> OK, If I understand it right; pci_configure_device is where
> program_hpp_type0 called. You also want to enable AER in this function.
>
> Move the contents of set_device_error_reporting into
> pci_configure_device like this below ?
>
> ...
> + int type = pci_pcie_type(dev);
>
> pci_configure_mps(dev);
>
> + if ((type == PCI_EXP_TYPE_ROOT_PORT) ||
> + (type == PCI_EXP_TYPE_UPSTREAM) ||
> + (type == PCI_EXP_TYPE_DOWNSTREAM)) {
> + pci_enable_pcie_error_reporting(dev);
> + }
>
> + pcie_set_ecrc_checking(dev);
Yep, that's the sort of thing I'm thinking.
I think there are some subtleties to consider.
_HPP/_HPX can twiddle some of the same bits. Should we allow _HPP to
clear a bit that pci_enable_pcie_error_reporting() would set? What
about the reverse?
There are a ridiculous number of places that call
pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR). We should
do it once and cache the result in struct pci_dev.
Bjorn
next prev parent reply other threads:[~2015-12-28 22:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-02 16:49 [PATCH v2] PCI/AER: enable SERR# forwarding for bridges and switches Sinan Kaya
2015-12-04 21:06 ` Bjorn Helgaas
2015-12-06 4:19 ` Sinan Kaya
2015-12-10 20:28 ` Sinan Kaya
2015-12-10 22:37 ` Bjorn Helgaas
2015-12-11 23:30 ` Sinan Kaya
2015-12-14 18:22 ` Sinan Kaya
2015-12-28 22:29 ` Bjorn Helgaas [this message]
2015-12-30 13:26 ` Sinan Kaya
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=20151228222927.GA15808@localhost \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=cov@codeaurora.org \
--cc=izumi.taku@jp.fujitsu.com \
--cc=jcm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=okaya@codeaurora.org \
--cc=timur@codeaurora.org \
--cc=wangyijing@huawei.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).