From: Bjorn Helgaas <bhelgaas@google.com>
I think this is essentially the same as Heiner's v3 posting, with these
changes:
- Added a pci_disable_parity() interface in pci.c instead of making a
public pci_quirk_broken_parity() because quirks.c is only compiled when
CONFIG_PCI_QUIRKS=y.
- Removed the setting of dev->broken_parity_status because it's really
only used by EDAC error reporting, and if we disable parity error
reporting, we shouldn't get there. This change will be visible in the
sysfs "broken_parity_status" file, but I doubt that's important.
I dropped Leon's reviewed-by because I fiddled with the code. Similarly I
haven't added your signed-off-by, Heiner, because I don't want you blamed
for my errors. But if this looks OK to you I'll add it.
v1: https://lore.kernel.org/r/a6f09e1b-4076-59d1-a4e3-05c5955bfff2@gmail.com
v2: https://lore.kernel.org/r/bbc33d9b-af7c-8910-cdb3-fa3e3b2e3266@gmail.com
- reduce scope of N2100 change to using the new PCI core quirk
v3: https://lore.kernel.org/r/992c800e-2e12-16b0-4845-6311b295d932@gmail.com/
- improve commit message of patch 2
v4:
- add pci_disable_parity() (not conditional on CONFIG_PCI_QUIRKS)
- remove setting of dev->broken_parity_status
Bjorn Helgaas (1):
PCI: Add pci_disable_parity()
Heiner Kallweit (2):
IB/mthca: Disable parity reporting
ARM: iop32x: disable N2100 PCI parity reporting
arch/arm/mach-iop32x/n2100.c | 8 ++++----
drivers/net/ethernet/realtek/r8169_main.c | 14 --------------
drivers/pci/pci.c | 17 +++++++++++++++++
drivers/pci/quirks.c | 13 ++++---------
include/linux/pci.h | 1 +
5 files changed, 26 insertions(+), 27 deletions(-)
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Bjorn Helgaas <bhelgaas@google.com>
Add pci_disable_parity() to disable reporting of parity errors for a
device by clearing PCI_COMMAND_PARITY.
The device will still set PCI_STATUS_DETECTED_PARITY when it detects
a parity error or receives a Poisoned TLP, but it will not set
PCI_STATUS_PARITY, which means it will not assert PERR#
(conventional PCI) or report Poisoned TLPs (PCIe).
Based-on: https://lore.kernel.org/linux-arm-kernel/d375987c-ea4f-dd98-4ef8-99b2fbfe7c33@gmail.com/
Based-on-patch-by: Heiner Kallweit [off-list ref]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/pci.c | 17 +++++++++++++++++
include/linux/pci.h | 1 +
2 files changed, 18 insertions(+)
From: Heiner Kallweit <hkallweit1@gmail.com>
For Mellanox Tavor devices, we previously set dev->broken_parity_status,
which does not change the device's behavior; it merely prevents the EDAC
PCI error reporting from warning about Master Data Parity Error, Signaled
System Error, or Detected Parity Error for this device.
Instead, disable Parity Error Response so the device doesn't report
parity errors in the first place.
[bhelgaas: split out pci_disable_parity(), commit log, keep quirk static]
Link: https://lore.kernel.org/r/d375987c-ea4f-dd98-4ef8-99b2fbfe7c33@gmail.com
---
drivers/pci/quirks.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
From: Heiner Kallweit <hkallweit1@gmail.com>
On the N2100, instead of just marking the r8169 chips as having
broken_parity_status, disable parity error reporting for them entirely.
This was the only relevant place that set broken_parity_status, so we no
longer need to check for it in the r8169 error interrupt handler.
[bhelgaas: squash into one patch, commit log]
Link: https://lore.kernel.org/r/0c0dcbf2-5f1e-954c-ebd7-e6ccfae5c60e@gmail.com
Link: https://lore.kernel.org/r/9e312679-a684-e9c7-2656-420723706451@gmail.com
---
arch/arm/mach-iop32x/n2100.c | 8 ++++----
drivers/net/ethernet/realtek/r8169_main.c | 14 --------------
2 files changed, 4 insertions(+), 18 deletions(-)
From: Bjorn Helgaas <bhelgaas@google.com>
I think this is essentially the same as Heiner's v3 posting, with these
changes:
- Added a pci_disable_parity() interface in pci.c instead of making a
public pci_quirk_broken_parity() because quirks.c is only compiled when
CONFIG_PCI_QUIRKS=y.
- Removed the setting of dev->broken_parity_status because it's really
only used by EDAC error reporting, and if we disable parity error
reporting, we shouldn't get there. This change will be visible in the
sysfs "broken_parity_status" file, but I doubt that's important.
I dropped Leon's reviewed-by because I fiddled with the code. Similarly I
haven't added your signed-off-by, Heiner, because I don't want you blamed
for my errors. But if this looks OK to you I'll add it.
v1: https://lore.kernel.org/r/a6f09e1b-4076-59d1-a4e3-05c5955bfff2@gmail.com
v2: https://lore.kernel.org/r/bbc33d9b-af7c-8910-cdb3-fa3e3b2e3266@gmail.com
- reduce scope of N2100 change to using the new PCI core quirk
v3: https://lore.kernel.org/r/992c800e-2e12-16b0-4845-6311b295d932@gmail.com/
- improve commit message of patch 2
v4:
- add pci_disable_parity() (not conditional on CONFIG_PCI_QUIRKS)
- remove setting of dev->broken_parity_status
Bjorn Helgaas (1):
PCI: Add pci_disable_parity()
Heiner Kallweit (2):
IB/mthca: Disable parity reporting
ARM: iop32x: disable N2100 PCI parity reporting
arch/arm/mach-iop32x/n2100.c | 8 ++++----
drivers/net/ethernet/realtek/r8169_main.c | 14 --------------
drivers/pci/pci.c | 17 +++++++++++++++++
drivers/pci/quirks.c | 13 ++++---------
include/linux/pci.h | 1 +
5 files changed, 26 insertions(+), 27 deletions(-)
From: Krzysztof Wilczyński <hidden> Date: 2021-03-31 11:27:59
Hi Bjorn,
I think this is essentially the same as Heiner's v3 posting, with these
changes:
- Added a pci_disable_parity() interface in pci.c instead of making a
public pci_quirk_broken_parity() because quirks.c is only compiled when
CONFIG_PCI_QUIRKS=y.
Very nice idea to add pci_disable_parity(), looks very clean.
- Removed the setting of dev->broken_parity_status because it's really
only used by EDAC error reporting, and if we disable parity error
reporting, we shouldn't get there. This change will be visible in the
sysfs "broken_parity_status" file, but I doubt that's important.
I dropped Leon's reviewed-by because I fiddled with the code. Similarly I
haven't added your signed-off-by, Heiner, because I don't want you blamed
for my errors. But if this looks OK to you I'll add it.
[...]
Thank you Bjorn and Heiner!
Reviewed-by: Krzysztof Wilczyński <redacted>
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel