Commit 0cb60efd authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: re-add debug prints for unmodified BARs
  PCI: fix pciehp_free_irq()
  PCI Hotplug: fakephp: fix deadlock... again
  PCI: Fix printk warnings in setup-bus.c
  PCI: Fix printk warnings in probe.c
  PCI/iommu: blacklist DMAR on Intel G31/G33 chipsets
parents c19e8080 395a125c
...@@ -320,15 +320,15 @@ static int disable_slot(struct hotplug_slot *slot) ...@@ -320,15 +320,15 @@ static int disable_slot(struct hotplug_slot *slot)
return -ENODEV; return -ENODEV;
} }
/* remove the device from the pci core */
pci_remove_bus_device(dev);
/* queue work item to blow away this sysfs entry and other /* queue work item to blow away this sysfs entry and other
* parts. * parts.
*/ */
INIT_WORK(&dslot->remove_work, remove_slot_worker); INIT_WORK(&dslot->remove_work, remove_slot_worker);
queue_work(dummyphp_wq, &dslot->remove_work); queue_work(dummyphp_wq, &dslot->remove_work);
/* blow away this sysfs entry and other parts. */
remove_slot(dslot);
pci_dev_put(dev); pci_dev_put(dev);
} }
return 0; return 0;
......
...@@ -258,7 +258,7 @@ static int pcie_poll_cmd(struct controller *ctrl) ...@@ -258,7 +258,7 @@ static int pcie_poll_cmd(struct controller *ctrl)
return 1; return 1;
} }
} }
while (timeout > 1000) { while (timeout > 0) {
msleep(10); msleep(10);
timeout -= 10; timeout -= 10;
if (!pciehp_readw(ctrl, SLOTSTATUS, &slot_status)) { if (!pciehp_readw(ctrl, SLOTSTATUS, &slot_status)) {
......
...@@ -2348,11 +2348,34 @@ static void __init iommu_exit_mempool(void) ...@@ -2348,11 +2348,34 @@ static void __init iommu_exit_mempool(void)
} }
static int blacklist_iommu(const struct dmi_system_id *id)
{
printk(KERN_INFO "%s detected; disabling IOMMU\n",
id->ident);
dmar_disabled = 1;
return 0;
}
static struct dmi_system_id __initdata intel_iommu_dmi_table[] = {
{ /* Some DG33BU BIOS revisions advertised non-existent VT-d */
.callback = blacklist_iommu,
.ident = "Intel DG33BU",
{ DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
DMI_MATCH(DMI_BOARD_NAME, "DG33BU"),
}
},
{ }
};
void __init detect_intel_iommu(void) void __init detect_intel_iommu(void)
{ {
if (swiotlb || no_iommu || iommu_detected || dmar_disabled) if (swiotlb || no_iommu || iommu_detected || dmar_disabled)
return; return;
if (early_dmar_detect()) { if (early_dmar_detect()) {
dmi_check_system(intel_iommu_dmi_table);
if (dmar_disabled)
return;
iommu_detected = 1; iommu_detected = 1;
} }
} }
......
...@@ -304,6 +304,9 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, ...@@ -304,6 +304,9 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
} else { } else {
res->start = l64; res->start = l64;
res->end = l64 + sz64; res->end = l64 + sz64;
printk(KERN_DEBUG "PCI: %s reg %x 64bit mmio: [%llx, %llx]\n",
pci_name(dev), pos, (unsigned long long)res->start,
(unsigned long long)res->end);
} }
} else { } else {
sz = pci_size(l, sz, mask); sz = pci_size(l, sz, mask);
...@@ -313,6 +316,9 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, ...@@ -313,6 +316,9 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
res->start = l; res->start = l;
res->end = l + sz; res->end = l + sz;
printk(KERN_DEBUG "PCI: %s reg %x %s: [%llx, %llx]\n", pci_name(dev),
pos, (res->flags & IORESOURCE_IO) ? "io port":"32bit mmio",
(unsigned long long)res->start, (unsigned long long)res->end);
} }
out: out:
...@@ -383,7 +389,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) ...@@ -383,7 +389,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
res->start = base; res->start = base;
if (!res->end) if (!res->end)
res->end = limit + 0xfff; res->end = limit + 0xfff;
printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n", pci_name(dev), res->start, res->end); printk(KERN_DEBUG "PCI: bridge %s io port: [%llx, %llx]\n",
pci_name(dev), (unsigned long long) res->start,
(unsigned long long) res->end);
} }
res = child->resource[1]; res = child->resource[1];
...@@ -395,7 +403,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) ...@@ -395,7 +403,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM; res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;
res->start = base; res->start = base;
res->end = limit + 0xfffff; res->end = limit + 0xfffff;
printk(KERN_INFO "PCI: bridge %s 32bit mmio: [%llx, %llx]\n", pci_name(dev), res->start, res->end); printk(KERN_DEBUG "PCI: bridge %s 32bit mmio: [%llx, %llx]\n",
pci_name(dev), (unsigned long long) res->start,
(unsigned long long) res->end);
} }
res = child->resource[2]; res = child->resource[2];
...@@ -431,7 +441,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) ...@@ -431,7 +441,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH; res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH;
res->start = base; res->start = base;
res->end = limit + 0xfffff; res->end = limit + 0xfffff;
printk(KERN_INFO "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n", pci_name(dev), (res->flags & PCI_PREF_RANGE_TYPE_64)?"64":"32",res->start, res->end); printk(KERN_DEBUG "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n",
pci_name(dev), (res->flags & PCI_PREF_RANGE_TYPE_64) ? "64" : "32",
(unsigned long long) res->start, (unsigned long long) res->end);
} }
} }
......
...@@ -540,7 +540,11 @@ static void pci_bus_dump_res(struct pci_bus *bus) ...@@ -540,7 +540,11 @@ static void pci_bus_dump_res(struct pci_bus *bus)
if (!res) if (!res)
continue; continue;
printk(KERN_INFO "bus: %02x index %x %s: [%llx, %llx]\n", bus->number, i, (res->flags & IORESOURCE_IO)? "io port":"mmio", res->start, res->end); printk(KERN_INFO "bus: %02x index %x %s: [%llx, %llx]\n",
bus->number, i,
(res->flags & IORESOURCE_IO) ? "io port" : "mmio",
(unsigned long long) res->start,
(unsigned long long) res->end);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment