PCI: Add a return type for pci_reset_bridge_secondary_bus()
authorSinan Kaya <okaya@codeaurora.org>
Tue, 27 Feb 2018 20:14:11 +0000 (14:14 -0600)
committerBjorn Helgaas <helgaas@kernel.org>
Mon, 5 Mar 2018 14:10:14 +0000 (08:10 -0600)
Add a return value to pci_reset_bridge_secondary_bus() so we can return an
error if the device doesn't become ready after the reset.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Bjorn Helgaas <helgaas@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
drivers/pci/pci.c
include/linux/pci.h

index a3042e475901a491f8efb2dbeb07f2d6f35a7cb4..dde40506ffe5b5058d2bededd7888a9960822e06 100644 (file)
@@ -4229,9 +4229,11 @@ void __weak pcibios_reset_secondary_bus(struct pci_dev *dev)
  * Use the bridge control register to assert reset on the secondary bus.
  * Devices on the secondary bus are left in power-on state.
  */
-void pci_reset_bridge_secondary_bus(struct pci_dev *dev)
+int pci_reset_bridge_secondary_bus(struct pci_dev *dev)
 {
        pcibios_reset_secondary_bus(dev);
+
+       return 0;
 }
 EXPORT_SYMBOL_GPL(pci_reset_bridge_secondary_bus);
 
index af75d9d76189cc863213cbd7de729b2a32b9c9ab..562875d34b9805a852fdf29ddb9ada98f70a7ecb 100644 (file)
@@ -1095,7 +1095,7 @@ int pci_reset_bus(struct pci_bus *bus);
 int pci_try_reset_bus(struct pci_bus *bus);
 void pci_reset_secondary_bus(struct pci_dev *dev);
 void pcibios_reset_secondary_bus(struct pci_dev *dev);
-void pci_reset_bridge_secondary_bus(struct pci_dev *dev);
+int pci_reset_bridge_secondary_bus(struct pci_dev *dev);
 void pci_update_resource(struct pci_dev *dev, int resno);
 int __must_check pci_assign_resource(struct pci_dev *dev, int i);
 int __must_check pci_reassign_resource(struct pci_dev *dev, int i, resource_size_t add_size, resource_size_t align);