Message ID | ef15401783b3d4f33072f8ffe84073cea178486d.1582850766.git.sathyanarayanan.kuppuswamy@linux.intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | Add Error Disconnect Recover (EDR) support | expand |
Please fix your subject. Nothing is being exported in this patch.
Hi,
On 3/5/20 8:37 AM, Christoph Hellwig wrote:
> Please fix your subject. Nothing is being exported in this patch.
I will do it. I meant it as its being used outside dpc..
On Thu, Mar 05, 2020 at 09:42:21AM -0800, Kuppuswamy Sathyanarayanan wrote: > Hi, > > On 3/5/20 8:37 AM, Christoph Hellwig wrote: > > Please fix your subject. Nothing is being exported in this patch. > I will do it. I meant it as its being used outside dpc.. I'll update this. I have some other tweaks so I'll post an updated series soon.
Hi Bjorn, On 3/5/20 10:59 AM, Bjorn Helgaas wrote: > On Thu, Mar 05, 2020 at 09:42:21AM -0800, Kuppuswamy Sathyanarayanan wrote: >> Hi, >> >> On 3/5/20 8:37 AM, Christoph Hellwig wrote: >>> Please fix your subject. Nothing is being exported in this patch. >> I will do it. I meant it as its being used outside dpc.. > I'll update this. I have some other tweaks so I'll post an updated > series soon. In case if you haven't noticed, I have posted v17 version of it. please apply your changes on top of it.
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index c239e6dd2542..a475192c553a 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -449,6 +449,8 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info); void pci_save_dpc_state(struct pci_dev *dev); void pci_restore_dpc_state(struct pci_dev *dev); void pci_dpc_init(struct pci_dev *pdev); +void dpc_process_error(struct pci_dev *pdev); +pci_ers_result_t dpc_reset_link(struct pci_dev *pdev); #else static inline void pci_save_dpc_state(struct pci_dev *dev) {} static inline void pci_restore_dpc_state(struct pci_dev *dev) {} diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c index 57e7f94b98cf..e0a5b5f9547f 100644 --- a/drivers/pci/pcie/dpc.c +++ b/drivers/pci/pcie/dpc.c @@ -89,7 +89,7 @@ static int dpc_wait_rp_inactive(struct pci_dev *pdev) return 0; } -static pci_ers_result_t dpc_reset_link(struct pci_dev *pdev) +pci_ers_result_t dpc_reset_link(struct pci_dev *pdev) { u16 cap; @@ -193,9 +193,8 @@ static int dpc_get_aer_uncorrect_severity(struct pci_dev *dev, return 1; } -static irqreturn_t dpc_handler(int irq, void *context) +void dpc_process_error(struct pci_dev *pdev) { - struct pci_dev *pdev = context; u16 cap = pdev->dpc_cap, status, source, reason, ext_reason; struct aer_err_info info; @@ -225,6 +224,13 @@ static irqreturn_t dpc_handler(int irq, void *context) pci_cleanup_aer_uncorrect_error_status(pdev); pci_aer_clear_fatal_status(pdev); } +} + +static irqreturn_t dpc_handler(int irq, void *context) +{ + struct pci_dev *pdev = context; + + dpc_process_error(pdev); /* We configure DPC so it only triggers on ERR_FATAL */ pcie_do_recovery(pdev, pci_channel_io_frozen, dpc_reset_link);