]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: Add pci_reset_function_locked()
authorMarc Zyngier <marc.zyngier@arm.com>
Wed, 2 Aug 2017 01:11:02 +0000 (20:11 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2017 20:47:00 +0000 (13:47 -0700)
commitea9647cf87f59a71845fc3b137772830812ff2cf
tree649bb5911715cac8720c8df0f1204a0d87dd9066
parentc71305e6854d9b16191be12944029f4f09948022
PCI: Add pci_reset_function_locked()

commit a477b9cd37aa81a490dfa3265b7ff4f2c5a92463 upstream.

The implementation of PCI workarounds may require that the device is reset
from its probe function.  This implies that the PCI device lock is already
held, and makes calling pci_reset_function() impossible (since it will
itself try to take that lock).

Add pci_reset_function_locked(), which is the equivalent of
pci_reset_function(), except that it requires the PCI device lock to be
already held by the caller.

Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
[bhelgaas: folded in fix for conflict with 52354b9d1f46 ("PCI: Remove
__pci_dev_reset() and pci_dev_reset()")]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/pci.c
include/linux/pci.h