Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1298780

Re: [PATCH v2] PCI/AER: enable SERR# forwarding for bridges and switches

From Bjorn Helgaas <helgaas@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] PCI/AER: enable SERR# forwarding for bridges and switches
Date 2015-12-28 23:30 +0100
Message-ID <qKOsG-8lW-23@gated-at.bofh.it> (permalink)
References (1 earlier) <qC5M5-7Yp-1@gated-at.bofh.it> <qEg0G-2yC-13@gated-at.bofh.it> <qEi2u-3U5-21@gated-at.bofh.it> <qEFs6-2HI-11@gated-at.bofh.it> <qFG2K-1kV-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2] PCI/AER: enable SERR# forwarding for bridges and  switches Sinan Kaya <okaya@codeaurora.org> - 2015-12-12 00:40 +0100
  Re: [PATCH v2] PCI/AER: enable SERR# forwarding for bridges and  switches Sinan Kaya <okaya@codeaurora.org> - 2015-12-14 19:30 +0100
    Re: [PATCH v2] PCI/AER: enable SERR# forwarding for bridges and  switches Bjorn Helgaas <helgaas@kernel.org> - 2015-12-28 23:30 +0100
      Re: [PATCH v2] PCI/AER: enable SERR# forwarding for bridges and  switches Sinan Kaya <okaya@codeaurora.org> - 2015-12-30 14:30 +0100

csiph-web