From: Heiner Kallweit <hkallweit1@gmail.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
Realtek linux nic maintainers <nic_swsd@realtek.com>,
David Miller <davem@davemloft.net>,
Mirko Lindner <mlindner@marvell.com>,
Stephen Hemminger <stephen@networkplumber.org>,
Clemens Ladisch <clemens@ladisch.de>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
alsa-devel@alsa-project.org
Subject: [PATCH 0/9] PCI: add and use constant PCI_STATUS_ERROR_BITS and helper pci_status_get_and_clear_errors
Date: Mon, 24 Feb 2020 22:20:08 +0100 [thread overview]
Message-ID: <5939f711-92aa-e7ed-2a26-4f1e4169f786@gmail.com> (raw)
Few drivers have own definitions for this constant, so move it to the
PCI core. In addition there are several places where 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.
Heiner Kallweit (8):
PCI: add constant PCI_STATUS_ERROR_BITS
PCI: add pci_status_get_and_clear_errors
r8169: use pci_status_get_and_clear_errors
net: cassini: use pci_status_get_and_clear_errors
net: sungem: use pci_status_get_and_clear_errors
net: skfp: use PCI_STATUS_ERROR_BITS
PCI: pci-bridge-emul: use 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 | 2 +-
drivers/net/fddi/skfp/h/skfbi.h | 5 ----
drivers/pci/pci-bridge-emul.c | 14 ++---------
drivers/pci/pci.c | 23 +++++++++++++++++
include/linux/pci.h | 1 +
include/uapi/linux/pci_regs.h | 7 ++++++
sound/pci/bt87x.c | 7 +-----
12 files changed, 60 insertions(+), 84 deletions(-)
--
2.25.1
next reply other threads:[~2020-02-24 21:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-24 21:20 Heiner Kallweit [this message]
2020-02-24 21:22 ` [PATCH 1/8] PCI: add constant PCI_STATUS_ERROR_BITS Heiner Kallweit
2020-02-24 21:23 ` [PATCH 2/8] PCI: add pci_status_get_and_clear_errors Heiner Kallweit
2020-02-24 21:24 ` [PATCH 3/8] r8169: use pci_status_get_and_clear_errors Heiner Kallweit
2020-02-24 21:25 ` [PATCH 4/8] net: cassini: " Heiner Kallweit
2020-02-24 21:26 ` [PATCH 5/8] net: sungem: " Heiner Kallweit
2020-02-24 21:27 ` [PATCH 6/8] net: skfp: use PCI_STATUS_ERROR_BITS Heiner Kallweit
2020-02-24 21:28 ` [PATCH 7/8] PCI: pci-bridge-emul: " Heiner Kallweit
2020-02-24 21:29 ` [PATCH 8/8] sound: bt87x: use pci_status_get_and_clear_errors Heiner Kallweit
2020-02-24 23:33 ` [PATCH 0/9] PCI: add and use constant PCI_STATUS_ERROR_BITS and helper pci_status_get_and_clear_errors David Miller
2020-02-25 6:23 ` Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5939f711-92aa-e7ed-2a26-4f1e4169f786@gmail.com \
--to=hkallweit1@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=bhelgaas@google.com \
--cc=clemens@ladisch.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mlindner@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=perex@perex.cz \
--cc=stephen@networkplumber.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).