The following commit has been merged in the linux branch: commit 80fa680d22c11912a0be84b8139422eba1327322 Merge: 2caa731819a633bec5a56736e64c562b7e193666 9a821b231644028f8e2a853eb33d1184e925b183 Author: Linus Torvalds torvalds@linux-foundation.org Date: Tue Oct 13 10:04:40 2009 -0700
Merge git://git.infradead.org/~dwmw2/iommu-2.6.32
* git://git.infradead.org/~dwmw2/iommu-2.6.32: x86: Move pci_iommu_init to rootfs_initcall() Run pci_apply_final_quirks() sooner. Mark pci_apply_final_quirks() __init rather than __devinit Rename pci_init() to pci_apply_final_quirks(), move it to quirks.c intel-iommu: Yet another BIOS workaround: Isoch DMAR unit with no TLB space intel-iommu: Decode (and ignore) RHSA entries intel-iommu: Make "Unknown DMAR structure" message more informative
diff --combined arch/x86/kernel/pci-dma.c index d20009b,e0d9199..b2a71dc --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c @@@ -35,7 -35,7 +35,7 @@@ int iommu_detected __read_mostly = 0
/* * This variable becomes 1 if iommu=pt is passed on the kernel command line. - * If this variable is 1, IOMMU implementations do no DMA ranslation for + * If this variable is 1, IOMMU implementations do no DMA translation for * devices and allow every device to access to whole physical memory. This is * useful if a user want to use an IOMMU only for KVM device assignment to * guests and not for driver dma translation. @@@ -311,7 -311,7 +311,7 @@@ void pci_iommu_shutdown(void amd_iommu_shutdown(); } /* Must execute after PCI subsystem */ - fs_initcall(pci_iommu_init); + rootfs_initcall(pci_iommu_init);
#ifdef CONFIG_PCI /* Many VIA bridges seem to corrupt data for DAC. Disable it here */ diff --combined drivers/pci/pci.c index 3835871,2b575cf..4e4c295 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@@ -513,11 -513,7 +513,11 @@@ static int pci_raw_set_power_state(stru else if (state == PCI_D2 || dev->current_state == PCI_D2) udelay(PCI_PM_D2_DELAY);
- dev->current_state = state; + pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr); + dev->current_state = (pmcsr & PCI_PM_CTRL_STATE_MASK); + if (dev->current_state != state && printk_ratelimit()) + dev_info(&dev->dev, "Refused to change power state, " + "currently in D%d\n", dev->current_state);
/* According to section 5.4.1 of the "PCI BUS POWER MANAGEMENT * INTERFACE SPECIFICATION, REV. 1.2", a device transitioning @@@ -2546,10 -2542,10 +2546,10 @@@ int pci_resource_bar(struct pci_dev *de
/** * pci_set_vga_state - set VGA decode state on device and parents if requested - * @dev the PCI device - * @decode - true = enable decoding, false = disable decoding - * @command_bits PCI_COMMAND_IO and/or PCI_COMMAND_MEMORY - * @change_bridge - traverse ancestors and change bridges + * @dev: the PCI device + * @decode: true = enable decoding, false = disable decoding + * @command_bits: PCI_COMMAND_IO and/or PCI_COMMAND_MEMORY + * @change_bridge: traverse ancestors and change bridges */ int pci_set_vga_state(struct pci_dev *dev, bool decode, unsigned int command_bits, bool change_bridge) @@@ -2723,17 -2719,6 +2723,6 @@@ int __attribute__ ((weak)) pci_ext_cfg_ return 1; }
- static int __devinit pci_init(void) - { - struct pci_dev *dev = NULL; - - while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { - pci_fixup_device(pci_fixup_final, dev); - } - - return 0; - } - static int __init pci_setup(char *str) { while (str) { @@@ -2771,8 -2756,6 +2760,6 @@@ } early_param("pci", pci_setup);
- device_initcall(pci_init); - EXPORT_SYMBOL(pci_reenable_device); EXPORT_SYMBOL(pci_enable_device_io); EXPORT_SYMBOL(pci_enable_device_mem); diff --combined drivers/pci/quirks.c index efa6534,4e1b1b8..a790b17 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@@ -670,25 -670,6 +670,25 @@@ static void __devinit quirk_vt8235_acpi } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, quirk_vt8235_acpi);
+/* + * TI XIO2000a PCIe-PCI Bridge erroneously reports it supports fast back-to-back: + * Disable fast back-to-back on the secondary bus segment + */ +static void __devinit quirk_xio2000a(struct pci_dev *dev) +{ + struct pci_dev *pdev; + u16 command; + + dev_warn(&dev->dev, "TI XIO2000a quirk detected; " + "secondary bus fast back-to-back transfers disabled\n"); + list_for_each_entry(pdev, &dev->subordinate->devices, bus_list) { + pci_read_config_word(pdev, PCI_COMMAND, &command); + if (command & PCI_COMMAND_FAST_BACK) + pci_write_config_word(pdev, PCI_COMMAND, command & ~PCI_COMMAND_FAST_BACK); + } +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XIO2000A, + quirk_xio2000a);
#ifdef CONFIG_X86_IO_APIC
@@@ -2591,6 -2572,19 +2591,19 @@@ void pci_fixup_device(enum pci_fixup_pa } pci_do_fixups(dev, start, end); } + + static int __init pci_apply_final_quirks(void) + { + struct pci_dev *dev = NULL; + + while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { + pci_fixup_device(pci_fixup_final, dev); + } + + return 0; + } + + fs_initcall_sync(pci_apply_final_quirks); #else void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev) {} #endif