]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
PCI: Add pci_status_get_and_clear_errors
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 29 Feb 2020 22:24:23 +0000 (23:24 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Mar 2020 22:21:00 +0000 (14:21 -0800)
commitec5d9e87842a43be3a10ada0d5f560bbd3f31d5d
treee340fc0b992a0dfc1e44f696f033d1419b4e0666
parentd6e055e8733da5ce53fc69c77e379915400068c5
PCI: Add pci_status_get_and_clear_errors

Several drivers use the following code sequence:
1. Read PCI_STATUS
2. Mask out non-error bits
3. Action based on error bits set
4. Write back set error bits to clear them

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

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/pci/pci.c
include/linux/pci.h