diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2014-06-19 03:22:44 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-07-03 18:39:14 -0400 |
commit | 9e33002fd1791bcab626b19301670484c1cb6d50 (patch) | |
tree | c082812cab6251a1653550a81870a0fdad0bf627 | |
parent | 7171511eaec5bf23fb06078f59784a3a0626b38f (diff) |
PCI: Make resetting secondary bus logic common
Commit d92a208d086 ("powerpc/pci: Mask linkDown on resetting PCI bus")
implemented same logic (resetting PCI secondary bus by bridge's config
register PCI_BRIDGE_CTL_BUS_RESET) in PCI core and arch-dependent code. To
avoid the duplication, move the logic to pci_reset_secondary_bus().
That commit did not declare the pcibios_reset_secondary_bus() interface in
linux/include/pci.h. Add the declaration.
No functional change.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | drivers/pci/pci.c | 7 | ||||
-rw-r--r-- | include/linux/pci.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 63a54a340863..758f1d88f28d 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -3193,7 +3193,7 @@ static int pci_pm_reset(struct pci_dev *dev, int probe) | |||
3193 | return 0; | 3193 | return 0; |
3194 | } | 3194 | } |
3195 | 3195 | ||
3196 | void __weak pcibios_reset_secondary_bus(struct pci_dev *dev) | 3196 | void pci_reset_secondary_bus(struct pci_dev *dev) |
3197 | { | 3197 | { |
3198 | u16 ctrl; | 3198 | u16 ctrl; |
3199 | 3199 | ||
@@ -3219,6 +3219,11 @@ void __weak pcibios_reset_secondary_bus(struct pci_dev *dev) | |||
3219 | ssleep(1); | 3219 | ssleep(1); |
3220 | } | 3220 | } |
3221 | 3221 | ||
3222 | void __weak pcibios_reset_secondary_bus(struct pci_dev *dev) | ||
3223 | { | ||
3224 | pci_reset_secondary_bus(dev); | ||
3225 | } | ||
3226 | |||
3222 | /** | 3227 | /** |
3223 | * pci_reset_bridge_secondary_bus - Reset the secondary bus on a PCI bridge. | 3228 | * pci_reset_bridge_secondary_bus - Reset the secondary bus on a PCI bridge. |
3224 | * @dev: Bridge device | 3229 | * @dev: Bridge device |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 466bcd111d85..340529d399b2 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -978,6 +978,8 @@ int pci_try_reset_slot(struct pci_slot *slot); | |||
978 | int pci_probe_reset_bus(struct pci_bus *bus); | 978 | int pci_probe_reset_bus(struct pci_bus *bus); |
979 | int pci_reset_bus(struct pci_bus *bus); | 979 | int pci_reset_bus(struct pci_bus *bus); |
980 | int pci_try_reset_bus(struct pci_bus *bus); | 980 | int pci_try_reset_bus(struct pci_bus *bus); |
981 | void pci_reset_secondary_bus(struct pci_dev *dev); | ||
982 | void pcibios_reset_secondary_bus(struct pci_dev *dev); | ||
981 | void pci_reset_bridge_secondary_bus(struct pci_dev *dev); | 983 | void pci_reset_bridge_secondary_bus(struct pci_dev *dev); |
982 | void pci_update_resource(struct pci_dev *dev, int resno); | 984 | void pci_update_resource(struct pci_dev *dev, int resno); |
983 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 985 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |