* [PATCH] PCIe AER: report non fatal errors only to the functions of the same device @ 2017-08-04 2:18 Dongdong Liu 2017-08-15 22:50 ` Bjorn Helgaas 0 siblings, 1 reply; 6+ messages in thread From: Dongdong Liu @ 2017-08-04 2:18 UTC (permalink / raw) To: helgaas Cc: linux-pci, gabriele.paoloni, charles.chenxin, linuxarm, Dongdong Liu From: Gabriele Paoloni <gabriele.paoloni@huawei.com> Currently if an uncorrectable error is reported by an EP the AER driver walks over all the devices connected to the upstream port bus and in turns call the report_error_detected() callback. If any of the devices connected to the bus does not implement dev->driver->err_handler->error_detected() do_recovery() will fail. However for non fatal errors the PCIe link should not be considered compromised, therefore it makes sense to report the error only to all the functions of a multifunction device. This patch implements this new behaviour for non fatal errors. Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/pci/bus.c | 38 ++++++++++++++++++++++++++++++++++++++ drivers/pci/pcie/aer/aerdrv_core.c | 13 ++++++++++++- include/linux/pci.h | 3 ++- 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index bc56cf1..bc8f8b2 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -364,6 +364,44 @@ void pci_bus_add_devices(const struct pci_bus *bus) } EXPORT_SYMBOL(pci_bus_add_devices); +/** pci_walk_mf_dev - walk all functions of a multi-function + * device calling callback. + * @dev a function in a multi-function device + * @cb callback to be called for each device found + * @userdata arbitrary pointer to be passed to callback. + * + * Walk, on a given bus, only the adjacent functions of a + * multi-function device. Call the provided callback on each + * device found. + * + * We check the return of @cb each time. If it returns anything + * other than 0, we break out. + * + */ +void pci_walk_mf_dev(struct pci_dev *dev, int (*cb)(struct pci_dev *, void *), + void *userdata) +{ + int retval; + struct pci_bus *bus; + struct pci_dev *pdev; + int ndev; + + bus = dev->bus; + ndev = PCI_SLOT(dev->devfn); + + down_read(&pci_bus_sem); + /* call cb for all the functions of the mf device */ + list_for_each_entry(pdev, &bus->devices, bus_list) { + if (PCI_SLOT(pdev->devfn) == ndev) { + retval = cb(pdev, userdata); + if (retval) + break; + } + } + up_read(&pci_bus_sem); +} +EXPORT_SYMBOL_GPL(pci_walk_mf_dev); + /** pci_walk_bus - walk devices on/under bus, calling callback. * @top bus whose devices should be walked * @cb callback to be called for each device found diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index b1303b3..67c3dc0 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c @@ -390,7 +390,18 @@ static pci_ers_result_t broadcast_error_message(struct pci_dev *dev, * If the error is reported by an end point, we think this * error is related to the upstream link of the end point. */ - pci_walk_bus(dev->bus, cb, &result_data); + if ((state == pci_channel_io_normal) && + (!pci_ari_enabled(dev->bus))) + /* + * the error is non fatal so the bus is ok, just walk + * through all the functions in a multifunction device. + * if ARI is enabled on the bus then there can be only + * one device under that bus (so walk all the functions + * under the bus). + */ + pci_walk_mf_dev(dev, cb, &result_data); + else + pci_walk_bus(dev->bus, cb, &result_data); } return result_data.result; diff --git a/include/linux/pci.h b/include/linux/pci.h index 4869e66..69e77bb 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1269,7 +1269,8 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev); int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass); - +void pci_walk_mf_dev(struct pci_dev *dev, int (*cb)(struct pci_dev *, void *), + void *userdata); void pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *), void *userdata); int pci_cfg_space_size(struct pci_dev *dev); -- 1.9.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] PCIe AER: report non fatal errors only to the functions of the same device 2017-08-04 2:18 [PATCH] PCIe AER: report non fatal errors only to the functions of the same device Dongdong Liu @ 2017-08-15 22:50 ` Bjorn Helgaas 2017-08-16 8:50 ` Dongdong Liu 0 siblings, 1 reply; 6+ messages in thread From: Bjorn Helgaas @ 2017-08-15 22:50 UTC (permalink / raw) To: Dongdong Liu; +Cc: linux-pci, gabriele.paoloni, charles.chenxin, linuxarm On Fri, Aug 04, 2017 at 10:18:26AM +0800, Dongdong Liu wrote: > From: Gabriele Paoloni <gabriele.paoloni@huawei.com> > > Currently if an uncorrectable error is reported by an EP the AER > driver walks over all the devices connected to the upstream port > bus and in turns call the report_error_detected() callback. > If any of the devices connected to the bus does not implement > dev->driver->err_handler->error_detected() do_recovery() will fail. > > However for non fatal errors the PCIe link should not be considered > compromised, therefore it makes sense to report the error only to > all the functions of a multifunction device. > This patch implements this new behaviour for non fatal errors. Why do we bother even with other functions in the same multifunction device? PCIe r3.1, sec 6.2.2.2.2, says non-fatal errors only affect a particular transaction, and "devices not associated with the transaction in error are not impacted." A transaction is only associated with one function, so other functions in the same device shouldn't be affected, should they? > Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com> > Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> > --- > drivers/pci/bus.c | 38 ++++++++++++++++++++++++++++++++++++++ > drivers/pci/pcie/aer/aerdrv_core.c | 13 ++++++++++++- > include/linux/pci.h | 3 ++- > 3 files changed, 52 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c > index bc56cf1..bc8f8b2 100644 > --- a/drivers/pci/bus.c > +++ b/drivers/pci/bus.c > @@ -364,6 +364,44 @@ void pci_bus_add_devices(const struct pci_bus *bus) > } > EXPORT_SYMBOL(pci_bus_add_devices); > > +/** pci_walk_mf_dev - walk all functions of a multi-function > + * device calling callback. > + * @dev a function in a multi-function device > + * @cb callback to be called for each device found > + * @userdata arbitrary pointer to be passed to callback. > + * > + * Walk, on a given bus, only the adjacent functions of a > + * multi-function device. Call the provided callback on each > + * device found. > + * > + * We check the return of @cb each time. If it returns anything > + * other than 0, we break out. > + * > + */ > +void pci_walk_mf_dev(struct pci_dev *dev, int (*cb)(struct pci_dev *, void *), > + void *userdata) > +{ > + int retval; > + struct pci_bus *bus; > + struct pci_dev *pdev; > + int ndev; > + > + bus = dev->bus; > + ndev = PCI_SLOT(dev->devfn); > + > + down_read(&pci_bus_sem); > + /* call cb for all the functions of the mf device */ > + list_for_each_entry(pdev, &bus->devices, bus_list) { > + if (PCI_SLOT(pdev->devfn) == ndev) { > + retval = cb(pdev, userdata); > + if (retval) > + break; > + } > + } > + up_read(&pci_bus_sem); > +} > +EXPORT_SYMBOL_GPL(pci_walk_mf_dev); > + > /** pci_walk_bus - walk devices on/under bus, calling callback. > * @top bus whose devices should be walked > * @cb callback to be called for each device found > diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c > index b1303b3..67c3dc0 100644 > --- a/drivers/pci/pcie/aer/aerdrv_core.c > +++ b/drivers/pci/pcie/aer/aerdrv_core.c > @@ -390,7 +390,18 @@ static pci_ers_result_t broadcast_error_message(struct pci_dev *dev, > * If the error is reported by an end point, we think this > * error is related to the upstream link of the end point. > */ > - pci_walk_bus(dev->bus, cb, &result_data); > + if ((state == pci_channel_io_normal) && > + (!pci_ari_enabled(dev->bus))) > + /* > + * the error is non fatal so the bus is ok, just walk > + * through all the functions in a multifunction device. > + * if ARI is enabled on the bus then there can be only > + * one device under that bus (so walk all the functions > + * under the bus). > + */ > + pci_walk_mf_dev(dev, cb, &result_data); > + else > + pci_walk_bus(dev->bus, cb, &result_data); > } > > return result_data.result; > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 4869e66..69e77bb 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -1269,7 +1269,8 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, > struct pci_dev *dev); > int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, > int pass); > - > +void pci_walk_mf_dev(struct pci_dev *dev, int (*cb)(struct pci_dev *, void *), > + void *userdata); > void pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *), > void *userdata); > int pci_cfg_space_size(struct pci_dev *dev); > -- > 1.9.1 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] PCIe AER: report non fatal errors only to the functions of the same device 2017-08-15 22:50 ` Bjorn Helgaas @ 2017-08-16 8:50 ` Dongdong Liu 2017-08-16 14:07 ` Bjorn Helgaas 0 siblings, 1 reply; 6+ messages in thread From: Dongdong Liu @ 2017-08-16 8:50 UTC (permalink / raw) To: Bjorn Helgaas; +Cc: linux-pci, gabriele.paoloni, charles.chenxin, linuxarm Hi Bjorn 在 2017/8/16 6:50, Bjorn Helgaas 写道: > On Fri, Aug 04, 2017 at 10:18:26AM +0800, Dongdong Liu wrote: >> From: Gabriele Paoloni <gabriele.paoloni@huawei.com> >> >> Currently if an uncorrectable error is reported by an EP the AER >> driver walks over all the devices connected to the upstream port >> bus and in turns call the report_error_detected() callback. >> If any of the devices connected to the bus does not implement >> dev->driver->err_handler->error_detected() do_recovery() will fail. >> >> However for non fatal errors the PCIe link should not be considered >> compromised, therefore it makes sense to report the error only to >> all the functions of a multifunction device. >> This patch implements this new behaviour for non fatal errors. > > Why do we bother even with other functions in the same multifunction > device? PCIe r3.1, sec 6.2.2.2.2, says non-fatal errors only affect a > particular transaction, and "devices not associated with the > transaction in error are not impacted." > > A transaction is only associated with one function, so other functions > in the same device shouldn't be affected, should they? PCIe r3.1, sec 6.2.4 Error Logging PCI Express errors are not Function-specific. "Software is responsible for scanning all Functions in a multi-Function device when it detects one of those errors" Thanks, Dongdong > >> Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com> >> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> >> --- >> drivers/pci/bus.c | 38 ++++++++++++++++++++++++++++++++++++++ >> drivers/pci/pcie/aer/aerdrv_core.c | 13 ++++++++++++- >> include/linux/pci.h | 3 ++- >> 3 files changed, 52 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c >> index bc56cf1..bc8f8b2 100644 >> --- a/drivers/pci/bus.c >> +++ b/drivers/pci/bus.c >> @@ -364,6 +364,44 @@ void pci_bus_add_devices(const struct pci_bus *bus) >> } >> EXPORT_SYMBOL(pci_bus_add_devices); >> >> +/** pci_walk_mf_dev - walk all functions of a multi-function >> + * device calling callback. >> + * @dev a function in a multi-function device >> + * @cb callback to be called for each device found >> + * @userdata arbitrary pointer to be passed to callback. >> + * >> + * Walk, on a given bus, only the adjacent functions of a >> + * multi-function device. Call the provided callback on each >> + * device found. >> + * >> + * We check the return of @cb each time. If it returns anything >> + * other than 0, we break out. >> + * >> + */ >> +void pci_walk_mf_dev(struct pci_dev *dev, int (*cb)(struct pci_dev *, void *), >> + void *userdata) >> +{ >> + int retval; >> + struct pci_bus *bus; >> + struct pci_dev *pdev; >> + int ndev; >> + >> + bus = dev->bus; >> + ndev = PCI_SLOT(dev->devfn); >> + >> + down_read(&pci_bus_sem); >> + /* call cb for all the functions of the mf device */ >> + list_for_each_entry(pdev, &bus->devices, bus_list) { >> + if (PCI_SLOT(pdev->devfn) == ndev) { >> + retval = cb(pdev, userdata); >> + if (retval) >> + break; >> + } >> + } >> + up_read(&pci_bus_sem); >> +} >> +EXPORT_SYMBOL_GPL(pci_walk_mf_dev); >> + >> /** pci_walk_bus - walk devices on/under bus, calling callback. >> * @top bus whose devices should be walked >> * @cb callback to be called for each device found >> diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c >> index b1303b3..67c3dc0 100644 >> --- a/drivers/pci/pcie/aer/aerdrv_core.c >> +++ b/drivers/pci/pcie/aer/aerdrv_core.c >> @@ -390,7 +390,18 @@ static pci_ers_result_t broadcast_error_message(struct pci_dev *dev, >> * If the error is reported by an end point, we think this >> * error is related to the upstream link of the end point. >> */ >> - pci_walk_bus(dev->bus, cb, &result_data); >> + if ((state == pci_channel_io_normal) && >> + (!pci_ari_enabled(dev->bus))) >> + /* >> + * the error is non fatal so the bus is ok, just walk >> + * through all the functions in a multifunction device. >> + * if ARI is enabled on the bus then there can be only >> + * one device under that bus (so walk all the functions >> + * under the bus). >> + */ >> + pci_walk_mf_dev(dev, cb, &result_data); >> + else >> + pci_walk_bus(dev->bus, cb, &result_data); >> } >> >> return result_data.result; >> diff --git a/include/linux/pci.h b/include/linux/pci.h >> index 4869e66..69e77bb 100644 >> --- a/include/linux/pci.h >> +++ b/include/linux/pci.h >> @@ -1269,7 +1269,8 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, >> struct pci_dev *dev); >> int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, >> int pass); >> - >> +void pci_walk_mf_dev(struct pci_dev *dev, int (*cb)(struct pci_dev *, void *), >> + void *userdata); >> void pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *), >> void *userdata); >> int pci_cfg_space_size(struct pci_dev *dev); >> -- >> 1.9.1 >> > > . > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] PCIe AER: report non fatal errors only to the functions of the same device 2017-08-16 8:50 ` Dongdong Liu @ 2017-08-16 14:07 ` Bjorn Helgaas 2017-08-17 13:06 ` Gabriele Paoloni 0 siblings, 1 reply; 6+ messages in thread From: Bjorn Helgaas @ 2017-08-16 14:07 UTC (permalink / raw) To: Dongdong Liu; +Cc: linux-pci, gabriele.paoloni, charles.chenxin, linuxarm On Wed, Aug 16, 2017 at 04:50:16PM +0800, Dongdong Liu wrote: > Hi Bjorn > > 在 2017/8/16 6:50, Bjorn Helgaas 写道: > >On Fri, Aug 04, 2017 at 10:18:26AM +0800, Dongdong Liu wrote: > >>From: Gabriele Paoloni <gabriele.paoloni@huawei.com> > >> > >>Currently if an uncorrectable error is reported by an EP the AER > >>driver walks over all the devices connected to the upstream port > >>bus and in turns call the report_error_detected() callback. > >>If any of the devices connected to the bus does not implement > >>dev->driver->err_handler->error_detected() do_recovery() will fail. > >> > >>However for non fatal errors the PCIe link should not be considered > >>compromised, therefore it makes sense to report the error only to > >>all the functions of a multifunction device. > >>This patch implements this new behaviour for non fatal errors. > > > >Why do we bother even with other functions in the same multifunction > >device? PCIe r3.1, sec 6.2.2.2.2, says non-fatal errors only affect a > >particular transaction, and "devices not associated with the > >transaction in error are not impacted." > > > >A transaction is only associated with one function, so other functions > >in the same device shouldn't be affected, should they? > > PCIe r3.1, sec 6.2.4 Error Logging > PCI Express errors are not Function-specific. "Software is > responsible for scanning all Functions in a multi-Function device > when it detects one of those errors" The previous text basically says that if a multi-function device should generate at most one error reporting message, even if several functions have logged an error of the same severity. I think that single message corresponds to a single interrupt. So when it says "software is responsible for scanning all Functions in a multi-Function device," I think the point is that software should read the error reporting registers of all functions in case several of them have logged errors. But IIUC, this patch has nothing to do with reading the error CSRs (which should be done in the PCI/AER core). This patch merely changes the set of devices for which we call the driver's error reporting interfaces. If this is fixing a problem, maybe it would help clarify things if you could include the concrete details of what's going wrong. Bjorn > >>Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com> > >>Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> > >>--- > >> drivers/pci/bus.c | 38 ++++++++++++++++++++++++++++++++++++++ > >> drivers/pci/pcie/aer/aerdrv_core.c | 13 ++++++++++++- > >> include/linux/pci.h | 3 ++- > >> 3 files changed, 52 insertions(+), 2 deletions(-) > >> > >>diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c > >>index bc56cf1..bc8f8b2 100644 > >>--- a/drivers/pci/bus.c > >>+++ b/drivers/pci/bus.c > >>@@ -364,6 +364,44 @@ void pci_bus_add_devices(const struct pci_bus *bus) > >> } > >> EXPORT_SYMBOL(pci_bus_add_devices); > >> > >>+/** pci_walk_mf_dev - walk all functions of a multi-function > >>+ * device calling callback. > >>+ * @dev a function in a multi-function device > >>+ * @cb callback to be called for each device found > >>+ * @userdata arbitrary pointer to be passed to callback. > >>+ * > >>+ * Walk, on a given bus, only the adjacent functions of a > >>+ * multi-function device. Call the provided callback on each > >>+ * device found. > >>+ * > >>+ * We check the return of @cb each time. If it returns anything > >>+ * other than 0, we break out. > >>+ * > >>+ */ > >>+void pci_walk_mf_dev(struct pci_dev *dev, int (*cb)(struct pci_dev *, void *), > >>+ void *userdata) > >>+{ > >>+ int retval; > >>+ struct pci_bus *bus; > >>+ struct pci_dev *pdev; > >>+ int ndev; > >>+ > >>+ bus = dev->bus; > >>+ ndev = PCI_SLOT(dev->devfn); > >>+ > >>+ down_read(&pci_bus_sem); > >>+ /* call cb for all the functions of the mf device */ > >>+ list_for_each_entry(pdev, &bus->devices, bus_list) { > >>+ if (PCI_SLOT(pdev->devfn) == ndev) { > >>+ retval = cb(pdev, userdata); > >>+ if (retval) > >>+ break; > >>+ } > >>+ } > >>+ up_read(&pci_bus_sem); > >>+} > >>+EXPORT_SYMBOL_GPL(pci_walk_mf_dev); > >>+ > >> /** pci_walk_bus - walk devices on/under bus, calling callback. > >> * @top bus whose devices should be walked > >> * @cb callback to be called for each device found > >>diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c > >>index b1303b3..67c3dc0 100644 > >>--- a/drivers/pci/pcie/aer/aerdrv_core.c > >>+++ b/drivers/pci/pcie/aer/aerdrv_core.c > >>@@ -390,7 +390,18 @@ static pci_ers_result_t broadcast_error_message(struct pci_dev *dev, > >> * If the error is reported by an end point, we think this > >> * error is related to the upstream link of the end point. > >> */ > >>- pci_walk_bus(dev->bus, cb, &result_data); > >>+ if ((state == pci_channel_io_normal) && > >>+ (!pci_ari_enabled(dev->bus))) > >>+ /* > >>+ * the error is non fatal so the bus is ok, just walk > >>+ * through all the functions in a multifunction device. > >>+ * if ARI is enabled on the bus then there can be only > >>+ * one device under that bus (so walk all the functions > >>+ * under the bus). > >>+ */ > >>+ pci_walk_mf_dev(dev, cb, &result_data); > >>+ else > >>+ pci_walk_bus(dev->bus, cb, &result_data); > >> } > >> > >> return result_data.result; > >>diff --git a/include/linux/pci.h b/include/linux/pci.h > >>index 4869e66..69e77bb 100644 > >>--- a/include/linux/pci.h > >>+++ b/include/linux/pci.h > >>@@ -1269,7 +1269,8 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, > >> struct pci_dev *dev); > >> int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, > >> int pass); > >>- > >>+void pci_walk_mf_dev(struct pci_dev *dev, int (*cb)(struct pci_dev *, void *), > >>+ void *userdata); > >> void pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *), > >> void *userdata); > >> int pci_cfg_space_size(struct pci_dev *dev); > >>-- > >>1.9.1 > >> > > > >. > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] PCIe AER: report non fatal errors only to the functions of the same device 2017-08-16 14:07 ` Bjorn Helgaas @ 2017-08-17 13:06 ` Gabriele Paoloni 2017-08-17 16:48 ` Bjorn Helgaas 0 siblings, 1 reply; 6+ messages in thread From: Gabriele Paoloni @ 2017-08-17 13:06 UTC (permalink / raw) To: Bjorn Helgaas, liudongdong (C) Cc: linux-pci@vger.kernel.org, Chenxin (Charles), Linuxarm SGkgQmpvcm4NCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBCam9ybiBI ZWxnYWFzIFttYWlsdG86aGVsZ2Fhc0BrZXJuZWwub3JnXQ0KPiBTZW50OiAxNiBBdWd1c3QgMjAx NyAxNTowOA0KPiBUbzogbGl1ZG9uZ2RvbmcgKEMpDQo+IENjOiBsaW51eC1wY2lAdmdlci5rZXJu ZWwub3JnOyBHYWJyaWVsZSBQYW9sb25pOyBDaGVueGluIChDaGFybGVzKTsNCj4gTGludXhhcm0N Cj4gU3ViamVjdDogUmU6IFtQQVRDSF0gUENJZSBBRVI6IHJlcG9ydCBub24gZmF0YWwgZXJyb3Jz IG9ubHkgdG8gdGhlDQo+IGZ1bmN0aW9ucyBvZiB0aGUgc2FtZSBkZXZpY2UNCj4gDQo+IE9uIFdl ZCwgQXVnIDE2LCAyM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DQo+ID4gPj5AQCAtMTI2OSw3ICsxMjY5LDggQEAgY29uc3Qgc3RydWN0 IHBjaV9kZXZpY2VfaWQNCj4gKnBjaV9tYXRjaF9pZChjb25zdCBzdHJ1Y3QgcGNpX2RldmljZV9p ZCAqaWRzLA0KPiA+ID4+IAkJCQkJIHN0cnVjdCBwY2lfZGV2ICpkZXYpOw0KPiA+ID4+IGludCBw Y2lfc2Nhbl9icmlkZ2Uoc3RydWN0IHBjaV9idXMgKmJ1cywgc3RydWN0IHBjaV9kZXYgKmRldiwg aW50DQo+IG1heCwNCj4gPiA+PiAJCSAgICBpbnQgcGFzcyk7DQo+ID4gPj4tDQo+ID4gPj4rdm9p ZCBwY2lfd2Fsa19tZl9kZXYoc3RydWN0IHBjaV9kZXYgKmRldiwgaW50ICgqY2IpKHN0cnVjdCBw Y2lfZGV2DQo+ICosIHZvaWQgKiksDQo+ID4gPj4rCQkgIHZvaWQgKnVzZXJkYXRhKTsNCj4gPiA+ PiB2b2lkIHBjaV93YWxrX2J1cyhzdHJ1Y3QgcGNpX2J1cyAqdG9wLCBpbnQgKCpjYikoc3RydWN0 IHBjaV9kZXYgKiwNCj4gdm9pZCAqKSwNCj4gPiA+PiAJCSAgdm9pZCAqdXNlcmRhdGEpOw0KPiA+ ID4+IGludCBwY2lfY2ZnX3NwYWNlX3NpemUoc3RydWN0IHBjaV9kZXYgKmRldik7DQo+ID4gPj4t LQ0KPiA+ID4+MS45LjENCj4gPiA+Pg0KPiA+ID4NCj4gPiA+Lg0KPiA+ID4NCj4gPg0K ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] PCIe AER: report non fatal errors only to the functions of the same device 2017-08-17 13:06 ` Gabriele Paoloni @ 2017-08-17 16:48 ` Bjorn Helgaas 0 siblings, 0 replies; 6+ messages in thread From: Bjorn Helgaas @ 2017-08-17 16:48 UTC (permalink / raw) To: Gabriele Paoloni Cc: liudongdong (C), linux-pci@vger.kernel.org, Chenxin (Charles), Linuxarm On Thu, Aug 17, 2017 at 01:06:32PM +0000, Gabriele Paoloni wrote: > Hi Bjorn > > > -----Original Message----- > > From: Bjorn Helgaas [mailto:helgaas@kernel.org] > > Sent: 16 August 2017 15:08 > > To: liudongdong (C) > > Cc: linux-pci@vger.kernel.org; Gabriele Paoloni; Chenxin (Charles); > > Linuxarm > > Subject: Re: [PATCH] PCIe AER: report non fatal errors only to the > > functions of the same device > > > > On Wed, Aug 16, 2017 at 04:50:16PM +0800, Dongdong Liu wrote: > > > Hi Bjorn > > > > > > 在 2017/8/16 6:50, Bjorn Helgaas 写道: > > > >On Fri, Aug 04, 2017 at 10:18:26AM +0800, Dongdong Liu wrote: > > > >>From: Gabriele Paoloni <gabriele.paoloni@huawei.com> > > > >> > > > >>Currently if an uncorrectable error is reported by an EP the AER > > > >>driver walks over all the devices connected to the upstream port > > > >>bus and in turns call the report_error_detected() callback. > > > >>If any of the devices connected to the bus does not implement > > > >>dev->driver->err_handler->error_detected() do_recovery() will fail. > > > >> > > > >>However for non fatal errors the PCIe link should not be considered > > > >>compromised, therefore it makes sense to report the error only to > > > >>all the functions of a multifunction device. > > > >>This patch implements this new behaviour for non fatal errors. > > > > > > > >Why do we bother even with other functions in the same multifunction > > > >device? PCIe r3.1, sec 6.2.2.2.2, says non-fatal errors only affect > > a > > > >particular transaction, and "devices not associated with the > > > >transaction in error are not impacted." > > > > > > > >A transaction is only associated with one function, so other > > functions > > > >in the same device shouldn't be affected, should they? > > > > > > PCIe r3.1, sec 6.2.4 Error Logging > > > PCI Express errors are not Function-specific. "Software is > > > responsible for scanning all Functions in a multi-Function device > > > when it detects one of those errors" > > > > The previous text basically says that if a multi-function device > > should generate at most one error reporting message, even if several > > functions have logged an error of the same severity. I think that > > single message corresponds to a single interrupt. > > > > So when it says "software is responsible for scanning all Functions in > > a multi-Function device," I think the point is that software should > > read the error reporting registers of all functions in case several of > > them have logged errors. > > Right, looking again at the AER core it seems that find_source_device() > would look for the error sources by walking the PCIe hierarchy starting > from the RP that reported the error (however from AER_MAX_MULTI_ERR_DEVICES > max 5 devices can log an error on a single AER interrupt...). > > Anyway as it is now, and assuming that we have no more than 5 functions > in a multi-function device, AER core should call handle_error_source() > for each function that logged an error, right? > > > > > But IIUC, this patch has nothing to do with reading the error CSRs > > (which should be done in the PCI/AER core). This patch merely changes > > the set of devices for which we call the driver's error reporting > > interfaces. > > Correct. From our point of view if a fatal AER is reported by a function > then we need to call the driver callbacks also on all the function under > the same bus as the reporting device (as the link is compromised). > > We thought that for non-fatal errors this is not necessary as the bus > link should not be considered compromised, but we thought that for MF > devices maybe it would have been appropriate to call the driver callbacks > on the other functions of the same device. However after your consideration > above and after double checking the AER core it seems that also this is > not necessary (in fact for a MF device handle_error_source() will be called > for each function that logged the error) > > > > > If this is fixing a problem, maybe it would help clarify things if you > > could include the concrete details of what's going wrong. > > In Hi1620 we have some integrated controllers that appear as PCIe EPs > under the same bus. Some of these controllers (e.g. the SATA > controller) are missing the err_handler callbacks. > > If one device reports a non-fatal uncorrectable error with the current > AER core code the callbacks for all the devices under the same bus will > be called and, if any of the devices is missing the callback all the > devices in the subtree are left in error state without recovery... > This patch is needed to sort out a situation like this one. > > Anyway I think that after the considerations above on the MF device > I can modify this patch to just call the callback for the reporting > function...? Sounds like a reasonable approach. I'll compare the patch with the spec in more detail when you post it. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-08-17 16:48 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-08-04 2:18 [PATCH] PCIe AER: report non fatal errors only to the functions of the same device Dongdong Liu 2017-08-15 22:50 ` Bjorn Helgaas 2017-08-16 8:50 ` Dongdong Liu 2017-08-16 14:07 ` Bjorn Helgaas 2017-08-17 13:06 ` Gabriele Paoloni 2017-08-17 16:48 ` Bjorn Helgaas
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).