linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/10] PCI: Add and use constant PCI_STATUS_ERROR_BITS and helper pci_status_get_and_clear_errors
@ 2020-02-29 22:19 Heiner Kallweit
  2020-02-29 22:20 ` [PATCH v4 01/10] net: marvell: add PCI_STATUS_SIG_TARGET_ABORT to PCI status error bits Heiner Kallweit
                   ` (10 more replies)
  0 siblings, 11 replies; 18+ messages in thread
From: Heiner Kallweit @ 2020-02-29 22:19 UTC (permalink / raw)
  To: Bjorn Helgaas, Realtek linux nic maintainers, David Miller,
	Mirko Lindner, Stephen Hemminger, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai
  Cc: linux-pci, Linux Kernel Mailing List, netdev, alsa-devel

Several drivers have own definitions for this constant, so move it
to the PCI core. In addition in multiple places the following code
sequence is used:
1. Read PCI_STATUS
2. Mask out non-error bits
3. Action based on set error bits
4. Write back set error bits to clear them

As this is a repeated pattern, add a helper to the PCI core.

Most affected drivers are network drivers. But as it's about core
PCI functionality, I suppose the series should go through the PCI
tree.

v2:
- fix formal issue with cover letter
v3:
- fix dumb typo in patch 7
v4:
- add patches 1-3
- move new constant PCI_STATUS_ERROR_BITS to include/linux/pci.h
- small improvements in commit messages

Heiner Kallweit (10):
  net: marvell: add PCI_STATUS_SIG_TARGET_ABORT to PCI status error bits
  net: skfp: add PCI_STATUS_REC_TARGET_ABORT to PCI status error bits
  r8169: add PCI_STATUS_PARITY to PCI status error bits
  PCI: Add constant PCI_STATUS_ERROR_BITS
  PCI: Add pci_status_get_and_clear_errors
  r8169: use pci_status_get_and_clear_errors
  net: sun: use pci_status_get_and_clear_errors
  net: skfp: use new constant PCI_STATUS_ERROR_BITS
  PCI: pci-bridge-emul: Use new constant PCI_STATUS_ERROR_BITS
  sound: bt87x: use pci_status_get_and_clear_errors

 drivers/net/ethernet/marvell/skge.h       |  6 -----
 drivers/net/ethernet/marvell/sky2.h       |  6 -----
 drivers/net/ethernet/realtek/r8169_main.c | 15 +++++-------
 drivers/net/ethernet/sun/cassini.c        | 28 ++++++++-------------
 drivers/net/ethernet/sun/sungem.c         | 30 +++++++----------------
 drivers/net/fddi/skfp/drvfbi.c            |  4 +--
 drivers/net/fddi/skfp/h/skfbi.h           |  5 ----
 drivers/pci/pci-bridge-emul.c             | 14 ++---------
 drivers/pci/pci.c                         | 23 +++++++++++++++++
 include/linux/pci.h                       |  8 ++++++
 sound/pci/bt87x.c                         |  7 +-----
 11 files changed, 61 insertions(+), 85 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-03-06  6:07 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-29 22:19 [PATCH v4 00/10] PCI: Add and use constant PCI_STATUS_ERROR_BITS and helper pci_status_get_and_clear_errors Heiner Kallweit
2020-02-29 22:20 ` [PATCH v4 01/10] net: marvell: add PCI_STATUS_SIG_TARGET_ABORT to PCI status error bits Heiner Kallweit
2020-02-29 22:21 ` [PATCH v4 02/10] net: skfp: add PCI_STATUS_REC_TARGET_ABORT " Heiner Kallweit
2020-02-29 22:22 ` [PATCH v4 03/10] r8169: add PCI_STATUS_PARITY " Heiner Kallweit
2020-02-29 22:23 ` [PATCH v4 04/10] PCI: Add constant PCI_STATUS_ERROR_BITS Heiner Kallweit
2020-03-04 13:41   ` Bjorn Helgaas
2020-02-29 22:24 ` [PATCH v4 05/10] PCI: Add pci_status_get_and_clear_errors Heiner Kallweit
2020-03-04 13:43   ` Bjorn Helgaas
2020-02-29 22:25 ` [PATCH v4 06/10] r8169: use pci_status_get_and_clear_errors Heiner Kallweit
2020-02-29 22:26 ` [PATCH v4 07/10] net: sun: " Heiner Kallweit
2020-02-29 22:27 ` [PATCH v4 08/10] net: skfp: use new constant PCI_STATUS_ERROR_BITS Heiner Kallweit
2020-02-29 22:28 ` [PATCH v4 09/10] PCI: pci-bridge-emul: Use " Heiner Kallweit
2020-03-04 13:44   ` Bjorn Helgaas
2020-02-29 22:29 ` [PATCH v4 10/10] sound: bt87x: use pci_status_get_and_clear_errors Heiner Kallweit
2020-03-06  6:06   ` Takashi Iwai
2020-03-04  2:59 ` [PATCH v4 00/10] PCI: Add and use constant PCI_STATUS_ERROR_BITS and helper pci_status_get_and_clear_errors David Miller
2020-03-04 16:59   ` Bjorn Helgaas
2020-03-04 22:21     ` David Miller

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).