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

Commit b72c4094 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  x86/PCI: truncate _CRS windows with _LEN > _MAX - _MIN + 1
  x86/PCI: for host bridge address space collisions, show conflicting resource
  frv/PCI: remove redundant warnings
  x86/PCI: remove redundant warnings
  PCI: don't say we claimed a resource if we failed
  PCI quirk: Disable MSI on VIA K8T890 systems
  PCI quirk: RS780/RS880: work around missing MSI initialization
  PCI quirk: only apply CX700 PCI bus parking quirk if external VT6212L is present
  PCI: complain about devices that seem to be broken
  PCI: print resources consistently with %pR
  PCI: make disabled window printk style match the enabled ones
  PCI: break out primary/secondary/subordinate for readability
  PCI: for address space collisions, show conflicting resource
  resources: add interfaces that return conflict information
  PCI: cleanup error return for pcix get and set mmrbc functions
  PCI: fix access of PCI_X_CMD by pcix get and set mmrbc functions
  PCI: kill off pci_register_set_vga_state() symbol export.
  PCI: fix return value from pcix_get_max_mmrbc()
parents e4d50423 d558b483
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -94,8 +94,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
				r = &dev->resource[idx];
				r = &dev->resource[idx];
				if (!r->start)
				if (!r->start)
					continue;
					continue;
				if (pci_claim_resource(dev, idx) < 0)
				pci_claim_resource(dev, idx);
					printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev));
			}
			}
		}
		}
		pcibios_allocate_bus_resources(&bus->children);
		pcibios_allocate_bus_resources(&bus->children);
@@ -125,7 +124,6 @@ static void __init pcibios_allocate_resources(int pass)
				DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n",
				DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n",
				    r->start, r->end, r->flags, disabled, pass);
				    r->start, r->end, r->flags, disabled, pass);
				if (pci_claim_resource(dev, idx) < 0) {
				if (pci_claim_resource(dev, idx) < 0) {
					printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, pci_name(dev));
					/* We'll assign a new address later */
					/* We'll assign a new address later */
					r->end -= r->start;
					r->end -= r->start;
					r->start = 0;
					r->start = 0;
+18 −4
Original line number Original line Diff line number Diff line
@@ -122,8 +122,8 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
	struct acpi_resource_address64 addr;
	struct acpi_resource_address64 addr;
	acpi_status status;
	acpi_status status;
	unsigned long flags;
	unsigned long flags;
	struct resource *root;
	struct resource *root, *conflict;
	u64 start, end;
	u64 start, end, max_len;


	status = resource_to_addr(acpi_res, &addr);
	status = resource_to_addr(acpi_res, &addr);
	if (!ACPI_SUCCESS(status))
	if (!ACPI_SUCCESS(status))
@@ -140,6 +140,17 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
	} else
	} else
		return AE_OK;
		return AE_OK;


	max_len = addr.maximum - addr.minimum + 1;
	if (addr.address_length > max_len) {
		dev_printk(KERN_DEBUG, &info->bridge->dev,
			   "host bridge window length %#llx doesn't fit in "
			   "%#llx-%#llx, trimming\n",
			   (unsigned long long) addr.address_length,
			   (unsigned long long) addr.minimum,
			   (unsigned long long) addr.maximum);
		addr.address_length = max_len;
	}

	start = addr.minimum + addr.translation_offset;
	start = addr.minimum + addr.translation_offset;
	end = start + addr.address_length - 1;
	end = start + addr.address_length - 1;


@@ -157,9 +168,12 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
		return AE_OK;
		return AE_OK;
	}
	}


	if (insert_resource(root, res)) {
	conflict = insert_resource_conflict(root, res);
	if (conflict) {
		dev_err(&info->bridge->dev,
		dev_err(&info->bridge->dev,
			"can't allocate host bridge window %pR\n", res);
			"address space collision: host bridge window %pR "
			"conflicts with %s %pR\n",
			res, conflict->name, conflict);
	} else {
	} else {
		pci_bus_add_resource(info->bus, res, 0);
		pci_bus_add_resource(info->bus, res, 0);
		info->res_num++;
		info->res_num++;
+0 −5
Original line number Original line Diff line number Diff line
@@ -127,9 +127,6 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
					continue;
					continue;
				if (!r->start ||
				if (!r->start ||
				    pci_claim_resource(dev, idx) < 0) {
				    pci_claim_resource(dev, idx) < 0) {
					dev_info(&dev->dev,
						 "can't reserve window %pR\n",
						 r);
					/*
					/*
					 * Something is wrong with the region.
					 * Something is wrong with the region.
					 * Invalidate the resource to prevent
					 * Invalidate the resource to prevent
@@ -181,8 +178,6 @@ static void __init pcibios_allocate_resources(int pass)
					"BAR %d: reserving %pr (d=%d, p=%d)\n",
					"BAR %d: reserving %pr (d=%d, p=%d)\n",
					idx, r, disabled, pass);
					idx, r, disabled, pass);
				if (pci_claim_resource(dev, idx) < 0) {
				if (pci_claim_resource(dev, idx) < 0) {
					dev_info(&dev->dev,
						 "can't reserve %pR\n", r);
					/* We'll assign a new address later */
					/* We'll assign a new address later */
					r->end -= r->start;
					r->end -= r->start;
					r->start = 0;
					r->start = 0;
+1 −7
Original line number Original line Diff line number Diff line
@@ -116,13 +116,7 @@ int radeon_irq_kms_init(struct radeon_device *rdev)
	}
	}
	/* enable msi */
	/* enable msi */
	rdev->msi_enabled = 0;
	rdev->msi_enabled = 0;
	/* MSIs don't seem to work on my rs780;
	if (rdev->family >= CHIP_RV380) {
	 * not sure about rs880 or other rs780s.
	 * Needs more investigation.
	 */
	if ((rdev->family >= CHIP_RV380) &&
	    (rdev->family != CHIP_RS780) &&
	    (rdev->family != CHIP_RS880)) {
		int ret = pci_enable_msi(rdev->pdev);
		int ret = pci_enable_msi(rdev->pdev);
		if (!ret) {
		if (!ret) {
			rdev->msi_enabled = 1;
			rdev->msi_enabled = 1;
+2 −3
Original line number Original line Diff line number Diff line
@@ -832,9 +832,8 @@ static inline void dbg_ctrl(struct controller *ctrl)
	for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
	for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
		if (!pci_resource_len(pdev, i))
		if (!pci_resource_len(pdev, i))
			continue;
			continue;
		ctrl_info(ctrl, "  PCI resource [%d]     : 0x%llx@0x%llx\n",
		ctrl_info(ctrl, "  PCI resource [%d]     : %pR\n",
			  i, (unsigned long long)pci_resource_len(pdev, i),
			  i, &pdev->resource[i]);
			  (unsigned long long)pci_resource_start(pdev, i));
	}
	}
	ctrl_info(ctrl, "Slot Capabilities      : 0x%08x\n", ctrl->slot_cap);
	ctrl_info(ctrl, "Slot Capabilities      : 0x%08x\n", ctrl->slot_cap);
	ctrl_info(ctrl, "  Physical Slot Number : %d\n", PSN(ctrl));
	ctrl_info(ctrl, "  Physical Slot Number : %d\n", PSN(ctrl));
Loading