@@ -1080,9 +1080,11 @@ static void pci_enable_crs(struct pci_dev *pdev)
/* Enable CRS Software Visibility if supported */
pcie_capability_read_word(pdev, PCI_EXP_RTCAP, &root_cap);
- if (root_cap & PCI_EXP_RTCAP_CRSVIS)
+ if (root_cap & PCI_EXP_RTCAP_CRSVIS) {
pcie_capability_set_word(pdev, PCI_EXP_RTCTL,
PCI_EXP_RTCTL_CRSSVE);
+ pdev->crssv_enabled = true;
+ }
}
static unsigned int pci_scan_child_bus_extend(struct pci_bus *bus,
@@ -2414,6 +2416,10 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
list_add_tail(&dev->bus_list, &bus->devices);
up_write(&pci_bus_sem);
+ /* Propagate CRS Software Visibility bit from the parent bridge */
+ if (bus->self)
+ dev->crssv_enabled = bus->self->crssv_enabled;
+
ret = pcibios_add_device(dev);
WARN_ON(ret < 0);
@@ -386,6 +386,9 @@ struct pci_dev {
bit manually */
unsigned int ignore_reset_delay_on_sx_resume:1; /* Cached value from
pci_host_bridge */
+ unsigned int crssv_enabled:1; /* Configuration Request Retry
+ Status Software Visibility
+ enabled on (parent) bridge */
unsigned int delay[PCI_INIT_EVENT_COUNT]; /* minimum waiting time
after various events
in ms */