提交 fe32e2fa 编写于 作者: S Sinan Kaya 提交者: Bjorn Helgaas

PCI: Deprecate pci_reset_bus() and pci_reset_slot() functions

pci_reset_bus() and pci_reset_slot() functions are not being used by any
code.  Remove them from the kernel in favor of pci_try_reset_bus() and
pci_try_reset_slot() functions.
Signed-off-by: NSinan Kaya <okaya@codeaurora.org>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 811c5cb3
...@@ -4784,7 +4784,7 @@ int pci_probe_reset_slot(struct pci_slot *slot) ...@@ -4784,7 +4784,7 @@ int pci_probe_reset_slot(struct pci_slot *slot)
EXPORT_SYMBOL_GPL(pci_probe_reset_slot); EXPORT_SYMBOL_GPL(pci_probe_reset_slot);
/** /**
* pci_reset_slot - reset a PCI slot * __pci_try_reset_slot - Try to reset a PCI slot
* @slot: PCI slot to reset * @slot: PCI slot to reset
* *
* A PCI bus may host multiple slots, each slot may support a reset mechanism * A PCI bus may host multiple slots, each slot may support a reset mechanism
...@@ -4796,30 +4796,6 @@ EXPORT_SYMBOL_GPL(pci_probe_reset_slot); ...@@ -4796,30 +4796,6 @@ EXPORT_SYMBOL_GPL(pci_probe_reset_slot);
* through this function. PCI config space of all devices in the slot and * through this function. PCI config space of all devices in the slot and
* behind the slot is saved before and restored after reset. * behind the slot is saved before and restored after reset.
* *
* Return 0 on success, non-zero on error.
*/
int pci_reset_slot(struct pci_slot *slot)
{
int rc;
rc = pci_slot_reset(slot, 1);
if (rc)
return rc;
pci_slot_save_and_disable(slot);
rc = pci_slot_reset(slot, 0);
pci_slot_restore(slot);
return rc;
}
EXPORT_SYMBOL_GPL(pci_reset_slot);
/**
* __pci_try_reset_slot - Try to reset a PCI slot
* @slot: PCI slot to reset
*
* Same as above except return -EAGAIN if the slot cannot be locked * Same as above except return -EAGAIN if the slot cannot be locked
*/ */
static int __pci_try_reset_slot(struct pci_slot *slot) static int __pci_try_reset_slot(struct pci_slot *slot)
...@@ -4877,33 +4853,6 @@ int pci_probe_reset_bus(struct pci_bus *bus) ...@@ -4877,33 +4853,6 @@ int pci_probe_reset_bus(struct pci_bus *bus)
} }
EXPORT_SYMBOL_GPL(pci_probe_reset_bus); EXPORT_SYMBOL_GPL(pci_probe_reset_bus);
/**
* pci_reset_bus - reset a PCI bus
* @bus: top level PCI bus to reset
*
* Do a bus reset on the given bus and any subordinate buses, saving
* and restoring state of all devices.
*
* Return 0 on success, non-zero on error.
*/
int pci_reset_bus(struct pci_bus *bus)
{
int rc;
rc = pci_bus_reset(bus, 1);
if (rc)
return rc;
pci_bus_save_and_disable(bus);
rc = pci_bus_reset(bus, 0);
pci_bus_restore(bus);
return rc;
}
EXPORT_SYMBOL_GPL(pci_reset_bus);
/** /**
* __pci_try_reset_bus - Try to reset a PCI bus * __pci_try_reset_bus - Try to reset a PCI bus
* @bus: top level PCI bus to reset * @bus: top level PCI bus to reset
......
...@@ -1096,9 +1096,7 @@ int pci_reset_function(struct pci_dev *dev); ...@@ -1096,9 +1096,7 @@ int pci_reset_function(struct pci_dev *dev);
int pci_reset_function_locked(struct pci_dev *dev); int pci_reset_function_locked(struct pci_dev *dev);
int pci_try_reset_function(struct pci_dev *dev); int pci_try_reset_function(struct pci_dev *dev);
int pci_probe_reset_slot(struct pci_slot *slot); int pci_probe_reset_slot(struct pci_slot *slot);
int pci_reset_slot(struct pci_slot *slot);
int pci_probe_reset_bus(struct pci_bus *bus); int pci_probe_reset_bus(struct pci_bus *bus);
int pci_reset_bus(struct pci_bus *bus);
int pci_try_reset_bus(struct pci_dev *dev); int pci_try_reset_bus(struct pci_dev *dev);
void pci_reset_secondary_bus(struct pci_dev *dev); void pci_reset_secondary_bus(struct pci_dev *dev);
void pcibios_reset_secondary_bus(struct pci_dev *dev); void pcibios_reset_secondary_bus(struct pci_dev *dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册