2020-11-17 19:24:03

by Kelley, Sean V

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

From: Qiuxu Zhuo <[email protected]>

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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Qiuxu Zhuo <[email protected]>
Signed-off-by: Sean V Kelley <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
---
drivers/pci/pcie/aer_inject.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/aer_inject.c b/drivers/pci/pcie/aer_inject.c
index c2cbf425afc5..767f8859b99b 100644
--- a/drivers/pci/pcie/aer_inject.c
+++ b/drivers/pci/pcie/aer_inject.c
@@ -333,8 +333,11 @@ static int aer_inject(struct aer_error_inj *einj)
if (!dev)
return -ENODEV;
rpdev = pcie_find_root_port(dev);
+ /* If Root Port not found, try to find an RCEC */
+ if (!rpdev)
+ rpdev = dev->rcec;
if (!rpdev) {
- pci_err(dev, "Root port not found\n");
+ pci_err(dev, "Neither Root Port nor RCEC found\n");
ret = -ENODEV;
goto out_put;
}
--
2.29.2


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



On 11/17/20 11:19 AM, Sean V Kelley wrote:
> From: Qiuxu Zhuo <[email protected]>
>
> 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.
Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]>
>
> Co-developed-by: Sean V Kelley <[email protected]>
> Link: https://lore.kernel.org/r/[email protected]
> Signed-off-by: Qiuxu Zhuo <[email protected]>
> Signed-off-by: Sean V Kelley <[email protected]>
> Signed-off-by: Bjorn Helgaas <[email protected]>
> ---
> drivers/pci/pcie/aer_inject.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pcie/aer_inject.c b/drivers/pci/pcie/aer_inject.c
> index c2cbf425afc5..767f8859b99b 100644
> --- a/drivers/pci/pcie/aer_inject.c
> +++ b/drivers/pci/pcie/aer_inject.c
> @@ -333,8 +333,11 @@ static int aer_inject(struct aer_error_inj *einj)
> if (!dev)
> return -ENODEV;
> rpdev = pcie_find_root_port(dev);
> + /* If Root Port not found, try to find an RCEC */
> + if (!rpdev)
> + rpdev = dev->rcec;
> if (!rpdev) {
> - pci_err(dev, "Root port not found\n");
> + pci_err(dev, "Neither Root Port nor RCEC found\n");
> ret = -ENODEV;
> goto out_put;
> }
>

--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer