Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07f2daad authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branch 'pci/yijing-mps-v8' into next

* pci/yijing-mps-v8:
  PCI: Warn if unsafe MPS settings detected
  PCI: Fix MPS peer-to-peer DMA comment syntax
  PCI: Don't restrict MPS for slots below Root Ports
  PCI: Simplify MPS test for Downstream Port
  PCI: Remove unnecessary check for pcie_get_mps() failure
  PCI: Simplify pcie_bus_configure_settings() interface
  PCI: Drop "PCI-E" prefix from Max Payload Size message
parents 1193725f 5895af79
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -1672,12 +1672,8 @@ void pcibios_scan_phb(struct pci_controller *hose)
	/* Configure PCI Express settings */
	if (bus && !pci_has_flag(PCI_PROBE_ONLY)) {
		struct pci_bus *child;
		list_for_each_entry(child, &bus->children, node) {
			struct pci_dev *self = child->self;
			if (!self)
				continue;
			pcie_bus_configure_settings(child, self->pcie_mpss);
		}
		list_for_each_entry(child, &bus->children, node)
			pcie_bus_configure_settings(child);
	}
}

+2 −7
Original line number Diff line number Diff line
@@ -508,13 +508,8 @@ static void fixup_read_and_payload_sizes(struct pci_controller *controller)
						rc_dev_cap.word);

	/* Configure PCI Express MPS setting. */
	list_for_each_entry(child, &root_bus->children, node) {
		struct pci_dev *self = child->self;
		if (!self)
			continue;

		pcie_bus_configure_settings(child, self->pcie_mpss);
	}
	list_for_each_entry(child, &root_bus->children, node)
		pcie_bus_configure_settings(child);

	/*
	 * Set the mac_config register in trio based on the MPS/MRS of the link.
+2 −7
Original line number Diff line number Diff line
@@ -568,13 +568,8 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
	 */
	if (bus) {
		struct pci_bus *child;
		list_for_each_entry(child, &bus->children, node) {
			struct pci_dev *self = child->self;
			if (!self)
				continue;

			pcie_bus_configure_settings(child, self->pcie_mpss);
		}
		list_for_each_entry(child, &bus->children, node)
			pcie_bus_configure_settings(child);
	}

	if (bus && node != -1) {
+2 −3
Original line number Diff line number Diff line
@@ -160,9 +160,8 @@ void pci_configure_slot(struct pci_dev *dev)
			(dev->class >> 8) == PCI_CLASS_BRIDGE_PCI)))
		return;

	if (dev->bus && dev->bus->self)
		pcie_bus_configure_settings(dev->bus,
					    dev->bus->self->pcie_mpss);
	if (dev->bus)
		pcie_bus_configure_settings(dev->bus);

	memset(&hpp, 0, sizeof(hpp));
	ret = pci_get_hp_params(dev, &hpp);
+0 −3
Original line number Diff line number Diff line
@@ -3939,8 +3939,6 @@ int pcie_set_readrq(struct pci_dev *dev, int rq)
	if (pcie_bus_config == PCIE_BUS_PERFORMANCE) {
		int mps = pcie_get_mps(dev);

		if (mps < 0)
			return mps;
		if (mps < rq)
			rq = mps;
	}
@@ -3957,7 +3955,6 @@ EXPORT_SYMBOL(pcie_set_readrq);
 * @dev: PCI device to query
 *
 * Returns maximum payload size in bytes
 *    or appropriate error value.
 */
int pcie_get_mps(struct pci_dev *dev)
{
Loading