diff options
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index b1187ff31d8..6ab6bd3df4b 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -1351,7 +1351,8 @@ static int pcie_find_smpss(struct pci_dev *dev, void *data) | |||
1351 | * will occur as normal. | 1351 | * will occur as normal. |
1352 | */ | 1352 | */ |
1353 | if (dev->is_hotplug_bridge && (!list_is_singular(&dev->bus->devices) || | 1353 | if (dev->is_hotplug_bridge && (!list_is_singular(&dev->bus->devices) || |
1354 | dev->bus->self->pcie_type != PCI_EXP_TYPE_ROOT_PORT)) | 1354 | (dev->bus->self && |
1355 | dev->bus->self->pcie_type != PCI_EXP_TYPE_ROOT_PORT))) | ||
1355 | *smpss = 0; | 1356 | *smpss = 0; |
1356 | 1357 | ||
1357 | if (*smpss > dev->pcie_mpss) | 1358 | if (*smpss > dev->pcie_mpss) |
@@ -1457,12 +1458,24 @@ static int pcie_bus_configure_set(struct pci_dev *dev, void *data) | |||
1457 | */ | 1458 | */ |
1458 | void pcie_bus_configure_settings(struct pci_bus *bus, u8 mpss) | 1459 | void pcie_bus_configure_settings(struct pci_bus *bus, u8 mpss) |
1459 | { | 1460 | { |
1460 | u8 smpss = mpss; | 1461 | u8 smpss; |
1461 | 1462 | ||
1462 | if (!pci_is_pcie(bus->self)) | 1463 | if (!pci_is_pcie(bus->self)) |
1463 | return; | 1464 | return; |
1464 | 1465 | ||
1466 | if (pcie_bus_config == PCIE_BUS_TUNE_OFF) | ||
1467 | return; | ||
1468 | |||
1469 | /* FIXME - Peer to peer DMA is possible, though the endpoint would need | ||
1470 | * to be aware to the MPS of the destination. To work around this, | ||
1471 | * simply force the MPS of the entire system to the smallest possible. | ||
1472 | */ | ||
1473 | if (pcie_bus_config == PCIE_BUS_PEER2PEER) | ||
1474 | smpss = 0; | ||
1475 | |||
1465 | if (pcie_bus_config == PCIE_BUS_SAFE) { | 1476 | if (pcie_bus_config == PCIE_BUS_SAFE) { |
1477 | smpss = mpss; | ||
1478 | |||
1466 | pcie_find_smpss(bus->self, &smpss); | 1479 | pcie_find_smpss(bus->self, &smpss); |
1467 | pci_walk_bus(bus, pcie_find_smpss, &smpss); | 1480 | pci_walk_bus(bus, pcie_find_smpss, &smpss); |
1468 | } | 1481 | } |