[PATCH v12 04/15] PCI/ERR: Rename reset_link() to reset_subordinates()

2020-11-20 Thread Sean V Kelley
-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20201002184735.1229220-5-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by: Jonathan Cameron Reviewed-by: Kuppuswamy Sathyanarayanan --- drivers/pci/pci.h | 4 ++-- drivers/pci/pcie/err.c | 8

[PATCH v12 00/15] Add RCEC handling to PCI/AER

2020-11-20 Thread Sean V Kelley
to AER/ERR PCI/AER: Add RCEC AER error injection support Sean V Kelley (12): AER: aer_root_reset() non-native handling PCI/RCEC: Cache RCEC capabilities in pci_init_capabilities() PCI/ERR: Rename reset_link() to reset_subordinates() PCI/ERR: Simplify by using pci_upstream_bridge()

[PATCH v12 02/15] PCI/RCEC: Bind RCEC devices to the Root Port driver

2020-11-20 Thread Sean V Kelley
ntification register. Given the commonality with Root Ports and the need to also support AER and PME services for RCECs, extend the Root Port driver to support RCEC devices by adding the RCEC Class ID to the driver structure. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/2020

[PATCH v12 01/15] AER: aer_root_reset() non-native handling

2020-11-20 Thread Sean V Kelley
-Precision-5520/ Signed-off-by: Sean V Kelley --- drivers/pci/pcie/aer.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 65dff5f3457a..6fe2d4ef0635 100644 --- a/drivers/pci/pcie/aer.c +++ b/d

[PATCH v12 10/15] PCI/ERR: Limit AER resets in pcie_do_recovery()

2020-11-20 Thread Sean V Kelley
them to Root Ports and Downstream Ports. Link: https://lore.kernel.org/r/20201002184735.1229220-8-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by: Jonathan Cameron --- drivers/pci/pcie/err.c | 31 +-- 1 file changed, 25

[PATCH v12 09/15] PCI/ERR: Add pci_walk_bridge() to pcie_do_recovery()

2020-11-20 Thread Sean V Kelley
Consolidate subordinate bus checks with pci_walk_bus() into pci_walk_bridge() for walking below potentially AER affected bridges. [bhelgaas: fix kerneldoc] Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20201002184735.1229220-7-seanvk@oregontracks.org Signed-off-by: Sean V

[PATCH v12 08/15] PCI/ERR: Avoid negated conditional for clarity

2020-11-20 Thread Sean V Kelley
Reverse the sense of the Root Port/Downstream Port conditional for clarity. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by

[PATCH v12 07/15] PCI/ERR: Use "bridge" for clarity in pcie_do_recovery()

2020-11-20 Thread Sean V Kelley
l.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by: Jonathan Cameron Reviewed-by: Kuppuswamy Sathyanarayanan --- drivers/pci/pcie/err.c | 37 - 1 file changed, 20 insertions(+), 17

[PATCH v12 14/15] PCI/PME: Add pcie_walk_rcec() to RCEC PME handling

2020-11-20 Thread Sean V Kelley
current PME service driver and attach the PME service driver to the RCEC device. Co-developed-by: Qiuxu Zhuo Link: https://lore.kernel.org/r/20201002184735.1229220-14-seanvk@oregontracks.org Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas --- drivers/pci

[PATCH v12 12/15] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-11-20 Thread Sean V Kelley
device associated with the RCiEP, there is nothing to act upon as the firmware is acting before the OS. Add handling for the linked RCEC in AER/ERR while taking into account non-native cases. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/20201002184735.1229220-12-seanvk

[PATCH v12 15/15] PCI/AER: Add RCEC AER error injection support

2020-11-20 Thread Sean V Kelley
From: Qiuxu Zhuo Root Complex Event Collectors (RCEC) appear as peers to Root Ports and may also have the AER capability. Add RCEC support to the AER error injection driver. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/20201002184735.1229220-15-seanvk@oregontracks.org

[PATCH v12 11/15] PCI/RCEC: Add pcie_link_rcec() to associate RCiEPs

2020-11-20 Thread Sean V Kelley
/20201002184735.1229220-11-seanvk@oregontracks.org Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron --- drivers/pci/pci.h | 2 + drivers/pci/pcie/portdrv_pci.c | 3 ++ drivers/pci/pcie/rcec.c| 94

[PATCH v12 13/15] PCI/AER: Add pcie_walk_rcec() to RCEC AER handling

2020-11-20 Thread Sean V Kelley
@oregontracks.org Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron Reviewed-by: Kuppuswamy Sathyanarayanan --- drivers/pci/pci.h | 6 ++ drivers/pci/pcie/aer.c | 29 ++--- drivers/pci/pcie

[PATCH v12 03/15] PCI/RCEC: Cache RCEC capabilities in pci_init_capabilities()

2020-11-20 Thread Sean V Kelley
ter filling it] Suggested-by: Bjorn Helgaas Co-developed-by: Qiuxu Zhuo Link: https://lore.kernel.org/r/20201002184735.1229220-4-seanvk@oregontracks.org Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron --- drivers/pci/pc

[PATCH v12 05/15] PCI/ERR: Simplify by using pci_upstream_bridge()

2020-11-20 Thread Sean V Kelley
Use pci_upstream_bridge() in place of dev->bus->self. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by: Jonathan C

[PATCH v12 06/15] PCI/ERR: Simplify by computing pci_pcie_type() once

2020-11-20 Thread Sean V Kelley
Instead of calling pci_pcie_type(dev) twice, call it once and save the result. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas

[PATCH v11 11/16] PCI/ERR: Limit AER resets in pcie_do_recovery()

2020-11-17 Thread Sean V Kelley
them to Root Ports and Downstream Ports. Link: https://lore.kernel.org/r/20201002184735.1229220-8-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by: Jonathan Cameron --- drivers/pci/pcie/err.c | 31 +-- 1 file changed, 25

[PATCH v11 14/16] PCI/AER: Add pcie_walk_rcec() to RCEC AER handling

2020-11-17 Thread Sean V Kelley
@oregontracks.org Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron --- drivers/pci/pci.h | 6 ++ drivers/pci/pcie/aer.c | 29 ++--- drivers/pci/pcie/rcec.c | 37

[PATCH v11 16/16] PCI/AER: Add RCEC AER error injection support

2020-11-17 Thread Sean V Kelley
From: Qiuxu Zhuo Root Complex Event Collectors (RCEC) appear as peers to Root Ports and may also have the AER capability. Add RCEC support to the AER error injection driver. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/20201002184735.1229220-15-seanvk@oregontracks.org

[PATCH v11 15/16] PCI/PME: Add pcie_walk_rcec() to RCEC PME handling

2020-11-17 Thread Sean V Kelley
current PME service driver and attach the PME service driver to the RCEC device. Co-developed-by: Qiuxu Zhuo Link: https://lore.kernel.org/r/20201002184735.1229220-14-seanvk@oregontracks.org Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas --- drivers/pci

[PATCH v11 12/16] PCI/RCEC: Add pcie_link_rcec() to associate RCiEPs

2020-11-17 Thread Sean V Kelley
/20201002184735.1229220-11-seanvk@oregontracks.org Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron --- drivers/pci/pci.h | 2 + drivers/pci/pcie/portdrv_pci.c | 3 ++ drivers/pci/pcie/rcec.c| 94

[PATCH v11 10/16] PCI/ERR: Add pci_walk_bridge() to pcie_do_recovery()

2020-11-17 Thread Sean V Kelley
Consolidate subordinate bus checks with pci_walk_bus() into pci_walk_bridge() for walking below potentially AER affected bridges. [bhelgaas: fix kerneldoc] Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20201002184735.1229220-7-seanvk@oregontracks.org Signed-off-by: Sean V

[PATCH v11 13/16] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-11-17 Thread Sean V Kelley
device associated with the RCiEP, there is nothing to act upon as the firmware is acting before the OS. Add handling for the linked RCEC in AER/ERR while taking into account non-native cases. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/20201002184735.1229220-12-seanvk

[PATCH v11 05/16] PCI/ERR: Rename reset_link() to reset_subordinates()

2020-11-17 Thread Sean V Kelley
-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20201002184735.1229220-5-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by: Jonathan Cameron --- drivers/pci/pci.h | 4 ++-- drivers/pci/pcie/err.c | 8 2 files changed, 6 insertions

[PATCH v11 06/16] PCI/ERR: Simplify by using pci_upstream_bridge()

2020-11-17 Thread Sean V Kelley
Use pci_upstream_bridge() in place of dev->bus->self. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by: Jonathan C

[PATCH v11 09/16] PCI/ERR: Avoid negated conditional for clarity

2020-11-17 Thread Sean V Kelley
Reverse the sense of the Root Port/Downstream Port conditional for clarity. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by

[PATCH v11 02/16] PCI/RCEC: Add RCEC class code and extended capability

2020-11-17 Thread Sean V Kelley
From: Qiuxu Zhuo A PCIe Root Complex Event Collector (RCEC) has base class 0x08, sub-class 0x07, and programming interface 0x00. Add the class code 0x0807 to identify RCEC devices and add #defines for the RCEC Endpoint Association Extended Capability. See PCIe r5.0, sec 1.3.4 ("Root Complex Eve

[PATCH v11 04/16] PCI/RCEC: Cache RCEC capabilities in pci_init_capabilities()

2020-11-17 Thread Sean V Kelley
ter filling it] Suggested-by: Bjorn Helgaas Co-developed-by: Qiuxu Zhuo Link: https://lore.kernel.org/r/20201002184735.1229220-4-seanvk@oregontracks.org Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron --- drivers/pci/pc

[PATCH v11 08/16] PCI/ERR: Use "bridge" for clarity in pcie_do_recovery()

2020-11-17 Thread Sean V Kelley
l.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by: Jonathan Cameron --- drivers/pci/pcie/err.c | 37 - 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/driver

[PATCH v11 07/16] PCI/ERR: Simplify by computing pci_pcie_type() once

2020-11-17 Thread Sean V Kelley
Instead of calling pci_pcie_type(dev) twice, call it once and save the result. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas

[PATCH v11 00/16] Add RCEC handling to PCI/AER

2020-11-17 Thread Sean V Kelley
Add RCEC class code and extended capability PCI/RCEC: Bind RCEC devices to the Root Port driver PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR PCI/AER: Add RCEC AER error injection support Sean V Kelley (12): AER: aer_root_reset() non-native handling PCI/RCEC: Cache RCEC capabilit

[PATCH v11 03/16] PCI/RCEC: Bind RCEC devices to the Root Port driver

2020-11-17 Thread Sean V Kelley
ntification register. Given the commonality with Root Ports and the need to also support AER and PME services for RCECs, extend the Root Port driver to support RCEC devices by adding the RCEC Class ID to the driver structure. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/2020

[PATCH v11 01/16] AER: aer_root_reset() non-native handling

2020-11-17 Thread Sean V Kelley
-Precision-5520/ Signed-off-by: Sean V Kelley --- drivers/pci/pcie/aer.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 65dff5f3457a..6fe2d4ef0635 100644 --- a/drivers/pci/pcie/aer.c +++ b/d

Re: [PATCH V3] AER: aer_root_reset() non-native handling

2020-11-16 Thread Sean V Kelley
On 14 Nov 2020, at 7:37, Bjorn Helgaas wrote: On Wed, Nov 04, 2020 at 03:22:44PM -0800, Sean V Kelley wrote: If an OS has not been granted AER control via _OSC, then the OS should not make changes to PCI_ERR_ROOT_COMMAND and PCI_ERR_ROOT_STATUS related registers. Per section 4.5.1 of the

Re: [PATCH v10 13/16] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-11-05 Thread Sean V Kelley
On 5 Nov 2020, at 16:14, Sean V Kelley wrote: From: Qiuxu Zhuo When attempting error recovery for an RCiEP associated with an RCEC device, there needs to be a way to update the Root Error Status, the Uncorrectable Error Status and the Uncorrectable Error Severity of the parent RCEC. In

[PATCH v10 04/16] PCI/RCEC: Cache RCEC capabilities in pci_init_capabilities()

2020-11-05 Thread Sean V Kelley
ter filling it] Suggested-by: Bjorn Helgaas Co-developed-by: Qiuxu Zhuo Link: https://lore.kernel.org/r/20201002184735.1229220-4-seanvk@oregontracks.org Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron --- drivers/pci/pc

[PATCH v10 07/16] PCI/ERR: Simplify by computing pci_pcie_type() once

2020-11-05 Thread Sean V Kelley
Instead of calling pci_pcie_type(dev) twice, call it once and save the result. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas

[PATCH v10 11/16] PCI/ERR: Limit AER resets in pcie_do_recovery()

2020-11-05 Thread Sean V Kelley
them to Root Ports and Downstream Ports. Link: https://lore.kernel.org/r/20201002184735.1229220-8-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by: Jonathan Cameron --- drivers/pci/pcie/err.c | 31 +-- 1 file changed, 25

[PATCH v10 02/16] PCI/RCEC: Add RCEC class code and extended capability

2020-11-05 Thread Sean V Kelley
From: Qiuxu Zhuo A PCIe Root Complex Event Collector (RCEC) has base class 0x08, sub-class 0x07, and programming interface 0x00. Add the class code 0x0807 to identify RCEC devices and add #defines for the RCEC Endpoint Association Extended Capability. See PCIe r5.0, sec 1.3.4 ("Root Complex Eve

[PATCH v10 09/16] PCI/ERR: Avoid negated conditional for clarity

2020-11-05 Thread Sean V Kelley
Reverse the sense of the Root Port/Downstream Port conditional for clarity. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by

[PATCH v10 16/16] PCI/AER: Add RCEC AER error injection support

2020-11-05 Thread Sean V Kelley
From: Qiuxu Zhuo Root Complex Event Collectors (RCEC) appear as peers to Root Ports and may also have the AER capability. Add RCEC support to the AER error injection driver. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/20201002184735.1229220-15-seanvk@oregontracks.org

[PATCH v10 05/16] PCI/ERR: Rename reset_link() to reset_subordinates()

2020-11-05 Thread Sean V Kelley
-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20201002184735.1229220-5-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by: Jonathan Cameron --- drivers/pci/pci.h | 4 ++-- drivers/pci/pcie/err.c | 8 2 files changed, 6 insertions

[PATCH v10 03/16] PCI/RCEC: Bind RCEC devices to the Root Port driver

2020-11-05 Thread Sean V Kelley
ntification register. Given the commonality with Root Ports and the need to also support AER and PME services for RCECs, extend the Root Port driver to support RCEC devices by adding the RCEC Class ID to the driver structure. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/2020

[PATCH v10 00/16] Add RCEC handling to PCI/AER

2020-11-05 Thread Sean V Kelley
jection support Sean V Kelley (12): AER: aer_root_reset() non-native handling PCI/RCEC: Cache RCEC capabilities in pci_init_capabilities() PCI/ERR: Rename reset_link() to reset_subordinates() PCI/ERR: Simplify by using pci_upstream_bridge() PCI/ERR: Simplify by computing pci_pcie_type() once

[PATCH v10 01/16] AER: aer_root_reset() non-native handling

2020-11-05 Thread Sean V Kelley
-Precision-5520/ Signed-off-by: Sean V Kelley --- drivers/pci/pcie/aer.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 65dff5f3457a..4ab379fa1506 100644 --- a/drivers/pci/pcie/aer.c +++

[PATCH v10 12/16] PCI/RCEC: Add pcie_link_rcec() to associate RCiEPs

2020-11-05 Thread Sean V Kelley
/20201002184735.1229220-11-seanvk@oregontracks.org Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron --- drivers/pci/pci.h | 2 + drivers/pci/pcie/portdrv_pci.c | 3 ++ drivers/pci/pcie/rcec.c| 94

[PATCH v10 13/16] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-11-05 Thread Sean V Kelley
device associated with the RCiEP, there is nothing to act upon as the firmware is acting before the OS. Add handling for the linked RCEC in AER/ERR while taking into account non-native cases. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/20201002184735.1229220-12-seanvk

[PATCH v10 06/16] PCI/ERR: Simplify by using pci_upstream_bridge()

2020-11-05 Thread Sean V Kelley
Use pci_upstream_bridge() in place of dev->bus->self. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by: Jonathan C

[PATCH v10 15/16] PCI/PME: Add pcie_walk_rcec() to RCEC PME handling

2020-11-05 Thread Sean V Kelley
current PME service driver and attach the PME service driver to the RCEC device. Co-developed-by: Qiuxu Zhuo Link: https://lore.kernel.org/r/20201002184735.1229220-14-seanvk@oregontracks.org Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas --- drivers/pci

[PATCH v10 14/16] PCI/AER: Add pcie_walk_rcec() to RCEC AER handling

2020-11-05 Thread Sean V Kelley
@oregontracks.org Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron --- drivers/pci/pci.h | 6 ++ drivers/pci/pcie/aer.c | 29 ++--- drivers/pci/pcie/rcec.c | 37

[PATCH v10 08/16] PCI/ERR: Use "bridge" for clarity in pcie_do_recovery()

2020-11-05 Thread Sean V Kelley
l.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by: Jonathan Cameron --- drivers/pci/pcie/err.c | 37 - 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/driver

[PATCH v10 10/16] PCI/ERR: Add pci_walk_bridge() to pcie_do_recovery()

2020-11-05 Thread Sean V Kelley
Consolidate subordinate bus checks with pci_walk_bus() into pci_walk_bridge() for walking below potentially AER affected bridges. [bhelgaas: fix kerneldoc] Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20201002184735.1229220-7-seanvk@oregontracks.org Signed-off-by: Sean V

[PATCH V3] AER: aer_root_reset() non-native handling

2020-11-04 Thread Sean V Kelley
-Precision-5520/ Signed-off-by: Sean V Kelley --- Changes since V2 : Fixed an unfortunate copy/paste error. Changes since V1 [1]: Noted lack of historical context on isolation of both the pci_bus_error_reset() and the clearing of Root Error Status. In fact, the call to aer_enable_rootport(

[PATCH V2] AER: aer_root_reset() non-native handling

2020-11-04 Thread Sean V Kelley
-Precision-5520/ Signed-off-by: Sean V Kelley --- Changes since V1 [1]: Noted lack of historical context on isolation of both the pci_bus_error_reset() and the clearing of Root Error Status. In fact, the call to aer_enable_rootport() likewise disables system error generation in response to erro

Re: [PATCH] AER: aer_root_reset() non-native handling

2020-11-03 Thread Sean V Kelley
On 1 Nov 2020, at 22:27, Ethan Zhao wrote: On Sat, Oct 31, 2020 at 6:36 AM Sean V Kelley wrote: If an OS has not been granted AER control via _OSC, then the OS should not make changes to PCI_ERR_ROOT_COMMAND and PCI_ERR_ROOT_STATUS related registers. Per section 4.5.1 of the System Firmware

[PATCH] AER: aer_root_reset() non-native handling

2020-10-30 Thread Sean V Kelley
https://members.pcisig.com/wg/PCI-SIG/document/14076 [2] https://lore.kernel.org/linux-pci/20201020162820.GA370938@bjorn-Precision-5520/ Signed-off-by: Sean V Kelley --- drivers/pci/pcie/aer.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/driver

Re: [PATCH v9 12/15] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-10-19 Thread Sean V Kelley
On 19 Oct 2020, at 11:59, Kuppuswamy, Sathyanarayanan wrote: On 10/19/20 11:31 AM, Sean V Kelley wrote: On 19 Oct 2020, at 3:49, Ethan Zhao wrote: On Sat, Oct 17, 2020 at 6:29 AM Bjorn Helgaas wrote: [+cc Christoph, Ethan, Sinan, Keith; sorry should have cc'd you to begin with

Re: [PATCH v9 12/15] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-10-19 Thread Sean V Kelley
On Sat, 2020-10-17 at 09:14 -0700, Sean V Kelley wrote: > On 16 Oct 2020, at 13:30, Bjorn Helgaas wrote: > > > [+to Jonathan] > > > > On Thu, Oct 15, 2020 at 05:11:10PM -0700, Sean V Kelley wrote: > > > From: Qiuxu Zhuo > > > > > > When attemp

Re: [PATCH v9 12/15] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-10-19 Thread Sean V Kelley
ans OS is not in charge and should not be messing with AER I guess. That seems appropriate to me then. Thanks, Sean Thanks, Ethan On Fri, Oct 16, 2020 at 03:30:37PM -0500, Bjorn Helgaas wrote: [+to Jonathan] On Thu, Oct 15, 2020 at 05:11:10PM -0700, Sean V Kelley wrote: From: Qiuxu

Re: [PATCH v9 12/15] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-10-17 Thread Sean V Kelley
On 16 Oct 2020, at 13:30, Bjorn Helgaas wrote: [+to Jonathan] On Thu, Oct 15, 2020 at 05:11:10PM -0700, Sean V Kelley wrote: From: Qiuxu Zhuo When attempting error recovery for an RCiEP associated with an RCEC device, there needs to be a way to update the Root Error Status, the

Re: [PATCH v9 10/15] PCI/ERR: Limit AER resets in pcie_do_recovery()

2020-10-16 Thread Sean V Kelley
On 16 Oct 2020, at 10:22, Bjorn Helgaas wrote: On Thu, Oct 15, 2020 at 05:11:08PM -0700, Sean V Kelley wrote: From: Sean V Kelley In some cases a bridge may not exist as the hardware controlling may be handled only by firmware and so is not visible to the OS. This scenario is also possible

[PATCH v9 02/15] PCI/RCEC: Bind RCEC devices to the Root Port driver

2020-10-15 Thread Sean V Kelley
ntification register. Given the commonality with Root Ports and the need to also support AER and PME services for RCECs, extend the Root Port driver to support RCEC devices by adding the RCEC Class ID to the driver structure. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/2020

[PATCH v9 07/15] PCI/ERR: Use "bridge" for clarity in pcie_do_recovery()

2020-10-15 Thread Sean V Kelley
From: Sean V Kelley pcie_do_recovery() may be called with "dev" being either a bridge (Root Port or Switch Downstream Port) or an Endpoint. The bulk of the function deals with the bridge, so if we start with an Endpoint, we reset "dev" to be the bridge leading to it. For c

[PATCH v9 05/15] PCI/ERR: Simplify by using pci_upstream_bridge()

2020-10-15 Thread Sean V Kelley
From: Sean V Kelley Use pci_upstream_bridge() in place of dev->bus->self. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas

[PATCH v9 06/15] PCI/ERR: Simplify by computing pci_pcie_type() once

2020-10-15 Thread Sean V Kelley
From: Sean V Kelley Instead of calling pci_pcie_type(dev) twice, call it once and save the result. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off

[PATCH v9 08/15] PCI/ERR: Avoid negated conditional for clarity

2020-10-15 Thread Sean V Kelley
From: Sean V Kelley Reverse the sense of the Root Port/Downstream Port conditional for clarity. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20201002184735.1229220-6-seanvk@oregontracks.org Signed-off-by: Sean V Kelley Signed-off-by

[PATCH v9 09/15] PCI/ERR: Add pci_walk_bridge() to pcie_do_recovery()

2020-10-15 Thread Sean V Kelley
From: Sean V Kelley Consolidate subordinate bus checks with pci_walk_bus() into pci_walk_bridge() for walking below potentially AER affected bridges. [bhelgaas: fix kerneldoc] Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20201002184735.1229220-7-seanvk@oregontracks.org

[PATCH v9 04/15] PCI/ERR: Rename reset_link() to reset_subordinates()

2020-10-15 Thread Sean V Kelley
From: Sean V Kelley reset_link() appears to be misnamed. The point is to reset any devices below a given bridge, so rename it to reset_subordinates() to make it clear that we are passing a bridge with the intent to reset the devices below it. [bhelgaas: fix reset_subordinate_device() typo

[PATCH v9 03/15] PCI/RCEC: Cache RCEC capabilities in pci_init_capabilities()

2020-10-15 Thread Sean V Kelley
From: Sean V Kelley Extend support for Root Complex Event Collectors by decoding and caching the RCEC Endpoint Association Extended Capabilities when enumerating. Use that cached information for later error source reporting. See PCIe r5.0, sec 7.9.10. [bhelgaas: make pci_rcec_init() void, set

[PATCH v9 10/15] PCI/ERR: Limit AER resets in pcie_do_recovery()

2020-10-15 Thread Sean V Kelley
From: Sean V Kelley In some cases a bridge may not exist as the hardware controlling may be handled only by firmware and so is not visible to the OS. This scenario is also possible in future use cases involving non-native use of RCECs by firmware. Explicitly apply conditional logic around these

[PATCH v9 13/15] PCI/AER: Add pcie_walk_rcec() to RCEC AER handling

2020-10-15 Thread Sean V Kelley
From: Sean V Kelley Root Complex Event Collectors (RCEC) appear as peers to Root Ports and also have the AER capability. In addition, actions need to be taken for associated RCiEPs. In such cases the RCECs will need to be walked in order to find and act upon their respective RCiEPs. Extend the

[PATCH v9 11/15] PCI/RCEC: Add pcie_link_rcec() to associate RCiEPs

2020-10-15 Thread Sean V Kelley
From: Sean V Kelley A Root Complex Event Collector terminates error and PME messages from associated RCiEPs. Use the RCEC Endpoint Association Extended Capability to identify associated RCiEPs. Link the associated RCiEPs as the RCECs are enumerated. Co-developed-by: Qiuxu Zhuo Link: https

[PATCH v9 12/15] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-10-15 Thread Sean V Kelley
device associated with the RCiEP, there is nothing to act upon as the firmware is acting before the OS. Add handling for the linked RCEC in AER/ERR while taking into account non-native cases. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/20201002184735.1229220-12-seanvk

[PATCH v9 15/15] PCI/AER: Add RCEC AER error injection support

2020-10-15 Thread Sean V Kelley
From: Qiuxu Zhuo Root Complex Event Collectors (RCEC) appear as peers to Root Ports and may also have the AER capability. Add RCEC support to the AER error injection driver. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/20201002184735.1229220-15-seanvk@oregontracks.org

[PATCH v9 14/15] PCI/PME: Add pcie_walk_rcec() to RCEC PME handling

2020-10-15 Thread Sean V Kelley
From: Sean V Kelley Root Complex Event Collectors (RCEC) appear as peers of Root Ports and also have the PME capability. As with AER, there is a need to be able to walk the RCiEPs associated with their RCEC for purposes of acting upon them with callbacks. Add RCEC support through the use of

[PATCH v9 01/15] PCI/RCEC: Add RCEC class code and extended capability

2020-10-15 Thread Sean V Kelley
From: Qiuxu Zhuo A PCIe Root Complex Event Collector (RCEC) has base class 0x08, sub-class 0x07, and programming interface 0x00. Add the class code 0x0807 to identify RCEC devices and add #defines for the RCEC Endpoint Association Extended Capability. See PCIe r5.0, sec 1.3.4 ("Root Complex Eve

[PATCH v9 00/15] Add RCEC handling to PCI/AER

2020-10-15 Thread Sean V Kelley
From: Sean V Kelley Changes since v8 [1] and based on discussion [2] and pci/err tree [3]: - No functional changes. Tested with aer injection. PCI/AER: Apply function level reset to RCiEP on fatal error - Remove. Handle with pcie_flr() directly when adding linked RCEC to AER/ERR. PCI/RCEC

Re: [PATCH v8 11/14] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-10-13 Thread Sean V Kelley
On Mon, 2020-10-12 at 17:58 -0500, Bjorn Helgaas wrote: > On Fri, Oct 09, 2020 at 11:51:39PM +, Kelley, Sean V wrote: > > On Fri, 2020-10-09 at 15:07 -0700, Sean V Kelley wrote: > > So I tested the following out, including your moving flr to aer.c: > > > >

Re: [PATCH v8 11/14] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-10-09 Thread Sean V Kelley
On 9 Oct 2020, at 14:30, Bjorn Helgaas wrote: On Fri, Oct 09, 2020 at 12:57:45PM -0500, Bjorn Helgaas wrote: On Fri, Oct 02, 2020 at 11:47:32AM -0700, Sean V Kelley wrote: From: Qiuxu Zhuo When attempting error recovery for an RCiEP associated with an RCEC device, there needs to be a way

Re: [PATCH v8 08/14] PCI/AER: Extend AER error handling to RCECs

2020-10-09 Thread Sean V Kelley
On 9 Oct 2020, at 14:27, Bjorn Helgaas wrote: On Fri, Oct 02, 2020 at 11:47:29AM -0700, Sean V Kelley wrote: From: Jonathan Cameron Currently the kernel does not handle AER errors for Root Complex integrated End Points (RCiEPs)[0]. These devices sit on a root bus within the Root Complex (RC

Re: [PATCH v8 11/14] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-10-09 Thread Sean V Kelley
On 9 Oct 2020, at 11:53, Sean V Kelley wrote: On 9 Oct 2020, at 11:34, Sean V Kelley wrote: On 9 Oct 2020, at 11:26, Sean V Kelley wrote: Hi Bjorn, On 9 Oct 2020, at 10:57, Bjorn Helgaas wrote: On Fri, Oct 02, 2020 at 11:47:32AM -0700, Sean V Kelley wrote: From: Qiuxu Zhuo When

Re: [PATCH v8 11/14] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-10-09 Thread Sean V Kelley
On 9 Oct 2020, at 11:34, Sean V Kelley wrote: On 9 Oct 2020, at 11:26, Sean V Kelley wrote: Hi Bjorn, On 9 Oct 2020, at 10:57, Bjorn Helgaas wrote: On Fri, Oct 02, 2020 at 11:47:32AM -0700, Sean V Kelley wrote: From: Qiuxu Zhuo When attempting error recovery for an RCiEP associated with

Re: [PATCH v8 11/14] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-10-09 Thread Sean V Kelley
On 9 Oct 2020, at 11:26, Sean V Kelley wrote: Hi Bjorn, On 9 Oct 2020, at 10:57, Bjorn Helgaas wrote: On Fri, Oct 02, 2020 at 11:47:32AM -0700, Sean V Kelley wrote: From: Qiuxu Zhuo When attempting error recovery for an RCiEP associated with an RCEC device, there needs to be a way to

Re: [PATCH v8 11/14] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-10-09 Thread Sean V Kelley
Hi Bjorn, On 9 Oct 2020, at 10:57, Bjorn Helgaas wrote: On Fri, Oct 02, 2020 at 11:47:32AM -0700, Sean V Kelley wrote: From: Qiuxu Zhuo When attempting error recovery for an RCiEP associated with an RCEC device, there needs to be a way to update the Root Error Status, the Uncorrectable

[PATCH v8 10/14] PCI/RCEC: Add pcie_link_rcec() to associate RCiEPs

2020-10-02 Thread Sean V Kelley
From: Sean V Kelley A Root Complex Event Collector provides support for terminating error and PME messages from associated RCiEPs. Make use of the RCEC Endpoint Association Extended Capability to identify associated RCiEPs. Link the associated RCiEPs as the RCECs are enumerated. Co-developed

[PATCH v8 14/14] PCI/AER: Add RCEC AER error injection support

2020-10-02 Thread Sean V Kelley
From: Qiuxu Zhuo The Root Complex Event Collectors (RCEC) appear as peers to Root Ports and also have the AER capability. So add RCEC support to the current AER error injection driver. Signed-off-by: Qiuxu Zhuo Co-developed-by: Sean V Kelley Signed-off-by: Sean V Kelley --- drivers/pci/pcie

[PATCH v8 09/14] PCI/AER: Apply function level reset to RCiEP on fatal error

2020-10-02 Thread Sean V Kelley
From: Qiuxu Zhuo Attempt to do a function level reset for an RCiEP on fatal error. Signed-off-by: Qiuxu Zhuo Reviewed-by: Jonathan Cameron --- drivers/pci/pcie/err.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/drivers/pci/pcie/err.c b/d

[PATCH v8 07/14] PCI/ERR: Limit AER resets in pcie_do_recovery()

2020-10-02 Thread Sean V Kelley
From: Sean V Kelley In some cases a bridge may not exist as the hardware controlling may be handled only by firmware and so is not visible to the OS. This scenario is also possible in future use cases involving non-native use of RCECs by firmware. So explicitly apply conditional logic around

[PATCH v8 13/14] PCI/PME: Add pcie_walk_rcec() to RCEC PME handling

2020-10-02 Thread Sean V Kelley
From: Sean V Kelley Root Complex Event Collectors (RCEC) appear as peers of Root Ports and also have the PME capability. As with AER, there is a need to be able to walk the RCiEPs associated with their RCEC for purposes of acting upon them with callbacks. So add RCEC support through the use of

[PATCH v8 08/14] PCI/AER: Extend AER error handling to RCECs

2020-10-02 Thread Sean V Kelley
xpress Error Section Signed-off-by: Jonathan Cameron Signed-off-by: Sean V Kelley --- drivers/pci/pcie/err.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c index 5ff1afa4763d..c4ceca42a3bf 100644 --- a/dr

[PATCH v8 02/14] PCI/RCEC: Bind RCEC devices to the Root Port driver

2020-10-02 Thread Sean V Kelley
re. Co-developed-by: Sean V Kelley Signed-off-by: Sean V Kelley Signed-off-by: Qiuxu Zhuo Reviewed-by: Jonathan Cameron --- drivers/pci/pcie/portdrv_pci.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.

[PATCH v8 04/14] PCI/ERR: Rename reset_link() to reset_subordinate_device()

2020-10-02 Thread Sean V Kelley
From: Sean V Kelley reset_link() appears to be misnamed. The point is to really reset any devices below a given bridge. So rename it to reset_subordinate_devices() to make it clear that we are passing a bridge with the intent to reset the devices below it. Suggested-by: Bjorn Helgaas Signed

[PATCH v8 05/14] PCI/ERR: Use "bridge" for clarity in pcie_do_recovery()

2020-10-02 Thread Sean V Kelley
From: Sean V Kelley A generic term such as "bridge" may be used for something with a subordinate bus. The mix of ports would benefit from a use of the term. Further clarity can be had in pcie_do_recovery() with use of pci_upstream_bridge() in place of dev->bus->self. Reverse the

[PATCH v8 12/14] PCI/AER: Add pcie_walk_rcec() to RCEC AER handling

2020-10-02 Thread Sean V Kelley
From: Sean V Kelley Root Complex Event Collectors (RCEC) appear as peers to Root Ports and also have the AER capability. In addition, actions need to be taken for associated RCiEPs. In such cases the RCECs will need to be walked in order to find and act upon their respective RCiEPs. Extend the

[PATCH v8 11/14] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-10-02 Thread Sean V Kelley
device associated with the RCiEP, there is nothing to act upon as the firmware is acting before the OS. So add handling for the linked 'rcec' in AER/ERR while taking into account non-native cases. Co-developed-by: Sean V Kelley Signed-off-by: Sean V Kelley Signed-off-by: Qiuxu Zhuo R

[PATCH v8 00/14] Add RCEC handling to PCI/AER

2020-10-02 Thread Sean V Kelley
From: Sean V Kelley Changes since v7 [1]: - No functional changes. - Reword bridge patch. - Noted testing below for #non-native/no RCEC case (Jonathan Cameron) - Separate out pci_walk_bus() into pci_walk_bridge() change. - Put remaining dev to bridge name changes in the separate patch from v7

[PATCH v8 01/14] PCI/RCEC: Add RCEC class code and extended capability

2020-10-02 Thread Sean V Kelley
From: Qiuxu Zhuo A PCIe Root Complex Event Collector (RCEC) has the base class 0x08, sub-class 0x07, and programming interface 0x00. Add the class code 0x0807 to identify RCEC devices and add the defines for the RCEC Endpoint Association Extended Capability. See PCI Express Base Specification, v

[PATCH v8 03/14] PCI/RCEC: Cache RCEC capabilities in pci_init_capabilities()

2020-10-02 Thread Sean V Kelley
From: Sean V Kelley Extend support for Root Complex Event Collectors by decoding and caching the RCEC Endpoint Association Extended Capabilities when enumerating. Use that cached information for later error source reporting. See PCI Express Base Specification, version 5.0-1, section 7.9.10

[PATCH v8 06/14] PCI/ERR: Add pci_walk_bridge() to pcie_do_recovery()

2020-10-02 Thread Sean V Kelley
From: Sean V Kelley Consolidate subordinate bus checks with pci_walk_bus() into pci_walk_bridge() for walking below potentially AER affected bridges. Suggested-by: Bjorn Helgaas Signed-off-by: Sean V Kelley --- drivers/pci/pcie/err.c | 29 ++--- 1 file changed, 22

Re: [PATCH v7 07/13] PCI/AER: Extend AER error handling to RCECs

2020-10-01 Thread Sean V Kelley
On 1 Oct 2020, at 16:14, Bjorn Helgaas wrote: On Wed, Sep 30, 2020 at 02:58:14PM -0700, Sean V Kelley wrote: From: Jonathan Cameron Currently the kernel does not handle AER errors for Root Complex integrated End Points (RCiEPs)[0]. These devices sit on a root bus within the Root Complex (RC

  1   2   3   >