aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/probe.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 9c26663c91d2..e02cdaa5bf0c 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -740,6 +740,17 @@ struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev,
740} 740}
741EXPORT_SYMBOL(pci_add_new_bus); 741EXPORT_SYMBOL(pci_add_new_bus);
742 742
743static void pci_enable_crs(struct pci_dev *pdev)
744{
745 u16 root_cap = 0;
746
747 /* Enable CRS Software Visibility if supported */
748 pcie_capability_read_word(pdev, PCI_EXP_RTCAP, &root_cap);
749 if (root_cap & PCI_EXP_RTCAP_CRSVIS)
750 pcie_capability_set_word(pdev, PCI_EXP_RTCTL,
751 PCI_EXP_RTCTL_CRSSVE);
752}
753
743/* 754/*
744 * If it's a bridge, configure it and scan the bus behind it. 755 * If it's a bridge, configure it and scan the bus behind it.
745 * For CardBus bridges, we don't scan behind as the devices will 756 * For CardBus bridges, we don't scan behind as the devices will
@@ -787,6 +798,8 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
787 pci_write_config_word(dev, PCI_BRIDGE_CONTROL, 798 pci_write_config_word(dev, PCI_BRIDGE_CONTROL,
788 bctl & ~PCI_BRIDGE_CTL_MASTER_ABORT); 799 bctl & ~PCI_BRIDGE_CTL_MASTER_ABORT);
789 800
801 pci_enable_crs(dev);
802
790 if ((secondary || subordinate) && !pcibios_assign_all_busses() && 803 if ((secondary || subordinate) && !pcibios_assign_all_busses() &&
791 !is_cardbus && !broken) { 804 !is_cardbus && !broken) {
792 unsigned int cmax; 805 unsigned int cmax;