Skip to content

PCI: Add and use constant PCI_STATUS_ERROR_BITS and helper pci_status_get_and_clear_errors

Heiner Kallweit alsa-devel linux-pci lkml netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest10 patches 7 repliesIn review
  2. v38 patches 4 repliesSuperseded
  3. v28 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v18 patches0 repliesSuperseded

Changes in v4 from the cover letter

- add patches 1-3
- move new constant PCI_STATUS_ERROR_BITS to include/linux/pci.h
- small improvements in commit messages

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10net: marvell: add PCI_STATUS_SIG_TARGET_ABORT to PCI status error bitsdrivers/net/ethernet/marvell/skge.h drivers/net/ethernet/marvell/sky2.h+2 -00 replies
2/10net: skfp: add PCI_STATUS_REC_TARGET_ABORT to PCI status error bitsdrivers/net/fddi/skfp/h/skfbi.h+1 -10 replies
3/10r8169: add PCI_STATUS_PARITY to PCI status error bitsdrivers/net/ethernet/realtek/r8169_main.c+1 -10 replies
4/10PCI: Add constant PCI_STATUS_ERROR_BITSdrivers/net/ethernet/marvell/skge.h drivers/net/ethernet/marvell/sky2.h include/linux/pci.h+7 -141 reply
5/10PCI: Add pci_status_get_and_clear_errorsdrivers/pci/pci.c include/linux/pci.h+24 -01 reply
6/10r8169: use pci_status_get_and_clear_errorsdrivers/net/ethernet/realtek/r8169_main.c+6 -90 replies
7/10net: sun: use pci_status_get_and_clear_errorsdrivers/net/ethernet/sun/cassini.c drivers/net/ethernet/sun/sungem.c+19 -390 replies
8/10net: skfp: use new constant PCI_STATUS_ERROR_BITSdrivers/net/fddi/skfp/drvfbi.c drivers/net/fddi/skfp/h/skfbi.h+2 -70 replies
9/10PCI: pci-bridge-emul: Use new constant PCI_STATUS_ERROR_BITSdrivers/pci/pci-bridge-emul.c+2 -121 reply
10/10sound: bt87x: use pci_status_get_and_clear_errorssound/pci/bt87x.c+1 -61 reply

Reviews trailers per patch

4 of 10 patches have a Reviewed-by or Acked-by.

PatchBjorn HelgaasTakashi Iwai
1/10
2/10
3/10
4/10A-b
5/10A-b
6/10
7/10
8/10
9/10A-b
10/10A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/10] PCI: Add and use constant PCI_STATUS_ERROR_BITS and helper pci_status_get_and_clear_errors

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(-)
Signature · 1 line
2.25.1