diff options
| -rw-r--r-- | Documentation/DocBook/kernel-api.tmpl | 6 | ||||
| -rw-r--r-- | arch/x86/include/asm/topology.h | 2 | ||||
| -rw-r--r-- | arch/x86/pci/amd_bus.c | 6 | ||||
| -rw-r--r-- | arch/x86/pci/common.c | 5 | ||||
| -rw-r--r-- | arch/x86/pci/i386.c | 4 | ||||
| -rw-r--r-- | arch/x86/pci/mmconfig-shared.c | 6 | ||||
| -rw-r--r-- | drivers/pci/access.c | 4 | ||||
| -rw-r--r-- | drivers/pci/htirq.c | 1 | ||||
| -rw-r--r-- | drivers/pci/pci-sysfs.c | 12 | ||||
| -rw-r--r-- | drivers/pci/pci.c | 70 | ||||
| -rw-r--r-- | drivers/pci/probe.c | 6 | ||||
| -rw-r--r-- | drivers/pci/quirks.c | 1 | ||||
| -rw-r--r-- | drivers/pci/setup-bus.c | 6 | ||||
| -rw-r--r-- | drivers/pci/slot.c | 4 | ||||
| -rw-r--r-- | include/linux/pci_regs.h | 1 |
15 files changed, 97 insertions, 37 deletions
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index d6ac5d61820e..44b3def961a2 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
| @@ -190,16 +190,20 @@ X!Ekernel/module.c | |||
| 190 | !Edrivers/pci/pci.c | 190 | !Edrivers/pci/pci.c |
| 191 | !Edrivers/pci/pci-driver.c | 191 | !Edrivers/pci/pci-driver.c |
| 192 | !Edrivers/pci/remove.c | 192 | !Edrivers/pci/remove.c |
| 193 | !Edrivers/pci/pci-acpi.c | ||
| 194 | !Edrivers/pci/search.c | 193 | !Edrivers/pci/search.c |
| 195 | !Edrivers/pci/msi.c | 194 | !Edrivers/pci/msi.c |
| 196 | !Edrivers/pci/bus.c | 195 | !Edrivers/pci/bus.c |
| 196 | !Edrivers/pci/access.c | ||
| 197 | !Edrivers/pci/irq.c | ||
| 198 | !Edrivers/pci/htirq.c | ||
| 197 | <!-- FIXME: Removed for now since no structured comments in source | 199 | <!-- FIXME: Removed for now since no structured comments in source |
| 198 | X!Edrivers/pci/hotplug.c | 200 | X!Edrivers/pci/hotplug.c |
| 199 | --> | 201 | --> |
| 200 | !Edrivers/pci/probe.c | 202 | !Edrivers/pci/probe.c |
| 203 | !Edrivers/pci/slot.c | ||
| 201 | !Edrivers/pci/rom.c | 204 | !Edrivers/pci/rom.c |
| 202 | !Edrivers/pci/iov.c | 205 | !Edrivers/pci/iov.c |
| 206 | !Idrivers/pci/pci-sysfs.c | ||
| 203 | </sect1> | 207 | </sect1> |
| 204 | <sect1><title>PCI Hotplug Support Library</title> | 208 | <sect1><title>PCI Hotplug Support Library</title> |
| 205 | !Edrivers/pci/hotplug/pci_hotplug_core.c | 209 | !Edrivers/pci/hotplug/pci_hotplug_core.c |
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 892b119dba6f..f44b49abca49 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h | |||
| @@ -200,7 +200,7 @@ static inline void arch_fix_phys_package_id(int num, u32 slot) | |||
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | struct pci_bus; | 202 | struct pci_bus; |
| 203 | void set_pci_bus_resources_arch_default(struct pci_bus *b); | 203 | void x86_pci_root_bus_res_quirks(struct pci_bus *b); |
| 204 | 204 | ||
| 205 | #ifdef CONFIG_SMP | 205 | #ifdef CONFIG_SMP |
| 206 | #define mc_capable() (cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids) | 206 | #define mc_capable() (cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids) |
diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c index 9bb09823b362..f893d6a6e803 100644 --- a/arch/x86/pci/amd_bus.c +++ b/arch/x86/pci/amd_bus.c | |||
| @@ -94,12 +94,16 @@ struct pci_root_info { | |||
| 94 | static int pci_root_num; | 94 | static int pci_root_num; |
| 95 | static struct pci_root_info pci_root_info[PCI_ROOT_NR]; | 95 | static struct pci_root_info pci_root_info[PCI_ROOT_NR]; |
| 96 | 96 | ||
| 97 | void set_pci_bus_resources_arch_default(struct pci_bus *b) | 97 | void x86_pci_root_bus_res_quirks(struct pci_bus *b) |
| 98 | { | 98 | { |
| 99 | int i; | 99 | int i; |
| 100 | int j; | 100 | int j; |
| 101 | struct pci_root_info *info; | 101 | struct pci_root_info *info; |
| 102 | 102 | ||
| 103 | /* don't go for it if _CRS is used */ | ||
| 104 | if (pci_probe & PCI_USE__CRS) | ||
| 105 | return; | ||
| 106 | |||
| 103 | /* if only one root bus, don't need to anything */ | 107 | /* if only one root bus, don't need to anything */ |
| 104 | if (pci_root_num < 2) | 108 | if (pci_root_num < 2) |
| 105 | return; | 109 | return; |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 8c362b96b644..2202b6257b82 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
| @@ -147,10 +147,13 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) | |||
| 147 | * are examined. | 147 | * are examined. |
| 148 | */ | 148 | */ |
| 149 | 149 | ||
| 150 | void __devinit pcibios_fixup_bus(struct pci_bus *b) | 150 | void __devinit pcibios_fixup_bus(struct pci_bus *b) |
| 151 | { | 151 | { |
| 152 | struct pci_dev *dev; | 152 | struct pci_dev *dev; |
| 153 | 153 | ||
| 154 | /* root bus? */ | ||
| 155 | if (!b->parent) | ||
| 156 | x86_pci_root_bus_res_quirks(b); | ||
| 154 | pci_read_bridge_bases(b); | 157 | pci_read_bridge_bases(b); |
| 155 | list_for_each_entry(dev, &b->devices, bus_list) | 158 | list_for_each_entry(dev, &b->devices, bus_list) |
| 156 | pcibios_fixup_device_resources(dev); | 159 | pcibios_fixup_device_resources(dev); |
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index f1817f71e009..a85bef20a3b9 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
| @@ -238,6 +238,10 @@ void __init pcibios_resource_survey(void) | |||
| 238 | */ | 238 | */ |
| 239 | fs_initcall(pcibios_assign_resources); | 239 | fs_initcall(pcibios_assign_resources); |
| 240 | 240 | ||
| 241 | void __weak x86_pci_root_bus_res_quirks(struct pci_bus *b) | ||
| 242 | { | ||
| 243 | } | ||
| 244 | |||
| 241 | /* | 245 | /* |
| 242 | * If we set up a device for bus mastering, we need to check the latency | 246 | * If we set up a device for bus mastering, we need to check the latency |
| 243 | * timer as certain crappy BIOSes forget to set it properly. | 247 | * timer as certain crappy BIOSes forget to set it properly. |
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 905bb526b133..5fa10bb9604f 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
| @@ -375,7 +375,7 @@ static acpi_status __init check_mcfg_resource(struct acpi_resource *res, | |||
| 375 | if (!fixmem32) | 375 | if (!fixmem32) |
| 376 | return AE_OK; | 376 | return AE_OK; |
| 377 | if ((mcfg_res->start >= fixmem32->address) && | 377 | if ((mcfg_res->start >= fixmem32->address) && |
| 378 | (mcfg_res->end < (fixmem32->address + | 378 | (mcfg_res->end <= (fixmem32->address + |
| 379 | fixmem32->address_length))) { | 379 | fixmem32->address_length))) { |
| 380 | mcfg_res->flags = 1; | 380 | mcfg_res->flags = 1; |
| 381 | return AE_CTRL_TERMINATE; | 381 | return AE_CTRL_TERMINATE; |
| @@ -392,7 +392,7 @@ static acpi_status __init check_mcfg_resource(struct acpi_resource *res, | |||
| 392 | return AE_OK; | 392 | return AE_OK; |
| 393 | 393 | ||
| 394 | if ((mcfg_res->start >= address.minimum) && | 394 | if ((mcfg_res->start >= address.minimum) && |
| 395 | (mcfg_res->end < (address.minimum + address.address_length))) { | 395 | (mcfg_res->end <= (address.minimum + address.address_length))) { |
| 396 | mcfg_res->flags = 1; | 396 | mcfg_res->flags = 1; |
| 397 | return AE_CTRL_TERMINATE; | 397 | return AE_CTRL_TERMINATE; |
| 398 | } | 398 | } |
| @@ -439,7 +439,7 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved, | |||
| 439 | u64 old_size = size; | 439 | u64 old_size = size; |
| 440 | int valid = 0; | 440 | int valid = 0; |
| 441 | 441 | ||
| 442 | while (!is_reserved(addr, addr + size - 1, E820_RESERVED)) { | 442 | while (!is_reserved(addr, addr + size, E820_RESERVED)) { |
| 443 | size >>= 1; | 443 | size >>= 1; |
| 444 | if (size < (16UL<<20)) | 444 | if (size < (16UL<<20)) |
| 445 | break; | 445 | break; |
diff --git a/drivers/pci/access.c b/drivers/pci/access.c index 64dd7df90e62..0f3706512686 100644 --- a/drivers/pci/access.c +++ b/drivers/pci/access.c | |||
| @@ -87,8 +87,8 @@ EXPORT_SYMBOL(pci_read_vpd); | |||
| 87 | * pci_write_vpd - Write entry to Vital Product Data | 87 | * pci_write_vpd - Write entry to Vital Product Data |
| 88 | * @dev: pci device struct | 88 | * @dev: pci device struct |
| 89 | * @pos: offset in vpd space | 89 | * @pos: offset in vpd space |
| 90 | * @count: number of bytes to read | 90 | * @count: number of bytes to write |
| 91 | * @val: value to write | 91 | * @buf: buffer containing write data |
| 92 | * | 92 | * |
| 93 | */ | 93 | */ |
| 94 | ssize_t pci_write_vpd(struct pci_dev *dev, loff_t pos, size_t count, const void *buf) | 94 | ssize_t pci_write_vpd(struct pci_dev *dev, loff_t pos, size_t count, const void *buf) |
diff --git a/drivers/pci/htirq.c b/drivers/pci/htirq.c index bf7d6ce9bbb3..6808d8333ecc 100644 --- a/drivers/pci/htirq.c +++ b/drivers/pci/htirq.c | |||
| @@ -158,6 +158,7 @@ int ht_create_irq(struct pci_dev *dev, int idx) | |||
| 158 | 158 | ||
| 159 | /** | 159 | /** |
| 160 | * ht_destroy_irq - destroy an irq created with ht_create_irq | 160 | * ht_destroy_irq - destroy an irq created with ht_create_irq |
| 161 | * @irq: irq to be destroyed | ||
| 161 | * | 162 | * |
| 162 | * This reverses ht_create_irq removing the specified irq from | 163 | * This reverses ht_create_irq removing the specified irq from |
| 163 | * existence. The irq should be free before this happens. | 164 | * existence. The irq should be free before this happens. |
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index a7eb1b46a5a8..85ebd02a64a7 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
| @@ -492,6 +492,7 @@ write_vpd_attr(struct kobject *kobj, struct bin_attribute *bin_attr, | |||
| 492 | /** | 492 | /** |
| 493 | * pci_read_legacy_io - read byte(s) from legacy I/O port space | 493 | * pci_read_legacy_io - read byte(s) from legacy I/O port space |
| 494 | * @kobj: kobject corresponding to file to read from | 494 | * @kobj: kobject corresponding to file to read from |
| 495 | * @bin_attr: struct bin_attribute for this file | ||
| 495 | * @buf: buffer to store results | 496 | * @buf: buffer to store results |
| 496 | * @off: offset into legacy I/O port space | 497 | * @off: offset into legacy I/O port space |
| 497 | * @count: number of bytes to read | 498 | * @count: number of bytes to read |
| @@ -517,6 +518,7 @@ pci_read_legacy_io(struct kobject *kobj, struct bin_attribute *bin_attr, | |||
| 517 | /** | 518 | /** |
| 518 | * pci_write_legacy_io - write byte(s) to legacy I/O port space | 519 | * pci_write_legacy_io - write byte(s) to legacy I/O port space |
| 519 | * @kobj: kobject corresponding to file to read from | 520 | * @kobj: kobject corresponding to file to read from |
| 521 | * @bin_attr: struct bin_attribute for this file | ||
| 520 | * @buf: buffer containing value to be written | 522 | * @buf: buffer containing value to be written |
| 521 | * @off: offset into legacy I/O port space | 523 | * @off: offset into legacy I/O port space |
| 522 | * @count: number of bytes to write | 524 | * @count: number of bytes to write |
| @@ -733,9 +735,9 @@ pci_mmap_resource_wc(struct kobject *kobj, struct bin_attribute *attr, | |||
| 733 | 735 | ||
| 734 | /** | 736 | /** |
| 735 | * pci_remove_resource_files - cleanup resource files | 737 | * pci_remove_resource_files - cleanup resource files |
| 736 | * @dev: dev to cleanup | 738 | * @pdev: dev to cleanup |
| 737 | * | 739 | * |
| 738 | * If we created resource files for @dev, remove them from sysfs and | 740 | * If we created resource files for @pdev, remove them from sysfs and |
| 739 | * free their resources. | 741 | * free their resources. |
| 740 | */ | 742 | */ |
| 741 | static void | 743 | static void |
| @@ -793,9 +795,9 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine) | |||
| 793 | 795 | ||
| 794 | /** | 796 | /** |
| 795 | * pci_create_resource_files - create resource files in sysfs for @dev | 797 | * pci_create_resource_files - create resource files in sysfs for @dev |
| 796 | * @dev: dev in question | 798 | * @pdev: dev in question |
| 797 | * | 799 | * |
| 798 | * Walk the resources in @dev creating files for each resource available. | 800 | * Walk the resources in @pdev creating files for each resource available. |
| 799 | */ | 801 | */ |
| 800 | static int pci_create_resource_files(struct pci_dev *pdev) | 802 | static int pci_create_resource_files(struct pci_dev *pdev) |
| 801 | { | 803 | { |
| @@ -829,6 +831,7 @@ void __weak pci_remove_resource_files(struct pci_dev *dev) { return; } | |||
| 829 | /** | 831 | /** |
| 830 | * pci_write_rom - used to enable access to the PCI ROM display | 832 | * pci_write_rom - used to enable access to the PCI ROM display |
| 831 | * @kobj: kernel object handle | 833 | * @kobj: kernel object handle |
| 834 | * @bin_attr: struct bin_attribute for this file | ||
| 832 | * @buf: user input | 835 | * @buf: user input |
| 833 | * @off: file offset | 836 | * @off: file offset |
| 834 | * @count: number of byte in input | 837 | * @count: number of byte in input |
| @@ -852,6 +855,7 @@ pci_write_rom(struct kobject *kobj, struct bin_attribute *bin_attr, | |||
| 852 | /** | 855 | /** |
| 853 | * pci_read_rom - read a PCI ROM | 856 | * pci_read_rom - read a PCI ROM |
| 854 | * @kobj: kernel object handle | 857 | * @kobj: kernel object handle |
| 858 | * @bin_attr: struct bin_attribute for this file | ||
| 855 | * @buf: where to put the data we read from the ROM | 859 | * @buf: where to put the data we read from the ROM |
| 856 | * @off: file offset | 860 | * @off: file offset |
| 857 | * @count: number of bytes to read | 861 | * @count: number of bytes to read |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 16fd0d4c3166..34bf0fdf5047 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
| @@ -681,11 +681,34 @@ EXPORT_SYMBOL(pci_choose_state); | |||
| 681 | 681 | ||
| 682 | #define PCI_EXP_SAVE_REGS 7 | 682 | #define PCI_EXP_SAVE_REGS 7 |
| 683 | 683 | ||
| 684 | #define pcie_cap_has_devctl(type, flags) 1 | ||
| 685 | #define pcie_cap_has_lnkctl(type, flags) \ | ||
| 686 | ((flags & PCI_EXP_FLAGS_VERS) > 1 || \ | ||
| 687 | (type == PCI_EXP_TYPE_ROOT_PORT || \ | ||
| 688 | type == PCI_EXP_TYPE_ENDPOINT || \ | ||
| 689 | type == PCI_EXP_TYPE_LEG_END)) | ||
| 690 | #define pcie_cap_has_sltctl(type, flags) \ | ||
| 691 | ((flags & PCI_EXP_FLAGS_VERS) > 1 || \ | ||
| 692 | ((type == PCI_EXP_TYPE_ROOT_PORT) || \ | ||
| 693 | (type == PCI_EXP_TYPE_DOWNSTREAM && \ | ||
| 694 | (flags & PCI_EXP_FLAGS_SLOT)))) | ||
| 695 | #define pcie_cap_has_rtctl(type, flags) \ | ||
| 696 | ((flags & PCI_EXP_FLAGS_VERS) > 1 || \ | ||
| 697 | (type == PCI_EXP_TYPE_ROOT_PORT || \ | ||
| 698 | type == PCI_EXP_TYPE_RC_EC)) | ||
| 699 | #define pcie_cap_has_devctl2(type, flags) \ | ||
| 700 | ((flags & PCI_EXP_FLAGS_VERS) > 1) | ||
| 701 | #define pcie_cap_has_lnkctl2(type, flags) \ | ||
| 702 | ((flags & PCI_EXP_FLAGS_VERS) > 1) | ||
| 703 | #define pcie_cap_has_sltctl2(type, flags) \ | ||
| 704 | ((flags & PCI_EXP_FLAGS_VERS) > 1) | ||
| 705 | |||
| 684 | static int pci_save_pcie_state(struct pci_dev *dev) | 706 | static int pci_save_pcie_state(struct pci_dev *dev) |
| 685 | { | 707 | { |
| 686 | int pos, i = 0; | 708 | int pos, i = 0; |
| 687 | struct pci_cap_saved_state *save_state; | 709 | struct pci_cap_saved_state *save_state; |
| 688 | u16 *cap; | 710 | u16 *cap; |
| 711 | u16 flags; | ||
| 689 | 712 | ||
| 690 | pos = pci_find_capability(dev, PCI_CAP_ID_EXP); | 713 | pos = pci_find_capability(dev, PCI_CAP_ID_EXP); |
| 691 | if (pos <= 0) | 714 | if (pos <= 0) |
| @@ -698,13 +721,22 @@ static int pci_save_pcie_state(struct pci_dev *dev) | |||
| 698 | } | 721 | } |
| 699 | cap = (u16 *)&save_state->data[0]; | 722 | cap = (u16 *)&save_state->data[0]; |
| 700 | 723 | ||
| 701 | pci_read_config_word(dev, pos + PCI_EXP_DEVCTL, &cap[i++]); | 724 | pci_read_config_word(dev, pos + PCI_EXP_FLAGS, &flags); |
| 702 | pci_read_config_word(dev, pos + PCI_EXP_LNKCTL, &cap[i++]); | 725 | |
| 703 | pci_read_config_word(dev, pos + PCI_EXP_SLTCTL, &cap[i++]); | 726 | if (pcie_cap_has_devctl(dev->pcie_type, flags)) |
| 704 | pci_read_config_word(dev, pos + PCI_EXP_RTCTL, &cap[i++]); | 727 | pci_read_config_word(dev, pos + PCI_EXP_DEVCTL, &cap[i++]); |
| 705 | pci_read_config_word(dev, pos + PCI_EXP_DEVCTL2, &cap[i++]); | 728 | if (pcie_cap_has_lnkctl(dev->pcie_type, flags)) |
| 706 | pci_read_config_word(dev, pos + PCI_EXP_LNKCTL2, &cap[i++]); | 729 | pci_read_config_word(dev, pos + PCI_EXP_LNKCTL, &cap[i++]); |
| 707 | pci_read_config_word(dev, pos + PCI_EXP_SLTCTL2, &cap[i++]); | 730 | if (pcie_cap_has_sltctl(dev->pcie_type, flags)) |
| 731 | pci_read_config_word(dev, pos + PCI_EXP_SLTCTL, &cap[i++]); | ||
| 732 | if (pcie_cap_has_rtctl(dev->pcie_type, flags)) | ||
| 733 | pci_read_config_word(dev, pos + PCI_EXP_RTCTL, &cap[i++]); | ||
| 734 | if (pcie_cap_has_devctl2(dev->pcie_type, flags)) | ||
| 735 | pci_read_config_word(dev, pos + PCI_EXP_DEVCTL2, &cap[i++]); | ||
| 736 | if (pcie_cap_has_lnkctl2(dev->pcie_type, flags)) | ||
| 737 | pci_read_config_word(dev, pos + PCI_EXP_LNKCTL2, &cap[i++]); | ||
| 738 | if (pcie_cap_has_sltctl2(dev->pcie_type, flags)) | ||
| 739 | pci_read_config_word(dev, pos + PCI_EXP_SLTCTL2, &cap[i++]); | ||
| 708 | 740 | ||
| 709 | return 0; | 741 | return 0; |
| 710 | } | 742 | } |
| @@ -714,6 +746,7 @@ static void pci_restore_pcie_state(struct pci_dev *dev) | |||
| 714 | int i = 0, pos; | 746 | int i = 0, pos; |
| 715 | struct pci_cap_saved_state *save_state; | 747 | struct pci_cap_saved_state *save_state; |
| 716 | u16 *cap; | 748 | u16 *cap; |
| 749 | u16 flags; | ||
| 717 | 750 | ||
| 718 | save_state = pci_find_saved_cap(dev, PCI_CAP_ID_EXP); | 751 | save_state = pci_find_saved_cap(dev, PCI_CAP_ID_EXP); |
| 719 | pos = pci_find_capability(dev, PCI_CAP_ID_EXP); | 752 | pos = pci_find_capability(dev, PCI_CAP_ID_EXP); |
| @@ -721,13 +754,22 @@ static void pci_restore_pcie_state(struct pci_dev *dev) | |||
| 721 | return; | 754 | return; |
| 722 | cap = (u16 *)&save_state->data[0]; | 755 | cap = (u16 *)&save_state->data[0]; |
| 723 | 756 | ||
| 724 | pci_write_config_word(dev, pos + PCI_EXP_DEVCTL, cap[i++]); | 757 | pci_read_config_word(dev, pos + PCI_EXP_FLAGS, &flags); |
| 725 | pci_write_config_word(dev, pos + PCI_EXP_LNKCTL, cap[i++]); | 758 | |
| 726 | pci_write_config_word(dev, pos + PCI_EXP_SLTCTL, cap[i++]); | 759 | if (pcie_cap_has_devctl(dev->pcie_type, flags)) |
| 727 | pci_write_config_word(dev, pos + PCI_EXP_RTCTL, cap[i++]); | 760 | pci_write_config_word(dev, pos + PCI_EXP_DEVCTL, cap[i++]); |
| 728 | pci_write_config_word(dev, pos + PCI_EXP_DEVCTL2, cap[i++]); | 761 | if (pcie_cap_has_lnkctl(dev->pcie_type, flags)) |
| 729 | pci_write_config_word(dev, pos + PCI_EXP_LNKCTL2, cap[i++]); | 762 | pci_write_config_word(dev, pos + PCI_EXP_LNKCTL, cap[i++]); |
| 730 | pci_write_config_word(dev, pos + PCI_EXP_SLTCTL2, cap[i++]); | 763 | if (pcie_cap_has_sltctl(dev->pcie_type, flags)) |
| 764 | pci_write_config_word(dev, pos + PCI_EXP_SLTCTL, cap[i++]); | ||
| 765 | if (pcie_cap_has_rtctl(dev->pcie_type, flags)) | ||
| 766 | pci_write_config_word(dev, pos + PCI_EXP_RTCTL, cap[i++]); | ||
| 767 | if (pcie_cap_has_devctl2(dev->pcie_type, flags)) | ||
| 768 | pci_write_config_word(dev, pos + PCI_EXP_DEVCTL2, cap[i++]); | ||
| 769 | if (pcie_cap_has_lnkctl2(dev->pcie_type, flags)) | ||
| 770 | pci_write_config_word(dev, pos + PCI_EXP_LNKCTL2, cap[i++]); | ||
| 771 | if (pcie_cap_has_sltctl2(dev->pcie_type, flags)) | ||
| 772 | pci_write_config_word(dev, pos + PCI_EXP_SLTCTL2, cap[i++]); | ||
| 731 | } | 773 | } |
| 732 | 774 | ||
| 733 | 775 | ||
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 8eb50dffb78a..e3c3e081b834 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
| @@ -1118,10 +1118,6 @@ unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus) | |||
| 1118 | return max; | 1118 | return max; |
| 1119 | } | 1119 | } |
| 1120 | 1120 | ||
| 1121 | void __attribute__((weak)) set_pci_bus_resources_arch_default(struct pci_bus *b) | ||
| 1122 | { | ||
| 1123 | } | ||
| 1124 | |||
| 1125 | struct pci_bus * pci_create_bus(struct device *parent, | 1121 | struct pci_bus * pci_create_bus(struct device *parent, |
| 1126 | int bus, struct pci_ops *ops, void *sysdata) | 1122 | int bus, struct pci_ops *ops, void *sysdata) |
| 1127 | { | 1123 | { |
| @@ -1180,8 +1176,6 @@ struct pci_bus * pci_create_bus(struct device *parent, | |||
| 1180 | b->resource[0] = &ioport_resource; | 1176 | b->resource[0] = &ioport_resource; |
| 1181 | b->resource[1] = &iomem_resource; | 1177 | b->resource[1] = &iomem_resource; |
| 1182 | 1178 | ||
| 1183 | set_pci_bus_resources_arch_default(b); | ||
| 1184 | |||
| 1185 | return b; | 1179 | return b; |
| 1186 | 1180 | ||
| 1187 | dev_create_file_err: | 1181 | dev_create_file_err: |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 0254741bece0..3067673d54f6 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
| @@ -2033,6 +2033,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_di | |||
| 2033 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); | 2033 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); |
| 2034 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3336, quirk_disable_all_msi); | 2034 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3336, quirk_disable_all_msi); |
| 2035 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); | 2035 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); |
| 2036 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3364, quirk_disable_all_msi); | ||
| 2036 | 2037 | ||
| 2037 | /* Disable MSI on chipsets that are known to not support it */ | 2038 | /* Disable MSI on chipsets that are known to not support it */ |
| 2038 | static void __devinit quirk_disable_msi(struct pci_dev *dev) | 2039 | static void __devinit quirk_disable_msi(struct pci_dev *dev) |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 8d9da9d30a61..a00f85471b6e 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
| @@ -536,11 +536,13 @@ static void pci_bus_dump_res(struct pci_bus *bus) | |||
| 536 | 536 | ||
| 537 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { | 537 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { |
| 538 | struct resource *res = bus->resource[i]; | 538 | struct resource *res = bus->resource[i]; |
| 539 | if (!res) | 539 | if (!res || !res->end) |
| 540 | continue; | 540 | continue; |
| 541 | 541 | ||
| 542 | dev_printk(KERN_DEBUG, &bus->dev, "resource %d %s %pR\n", i, | 542 | dev_printk(KERN_DEBUG, &bus->dev, "resource %d %s %pR\n", i, |
| 543 | (res->flags & IORESOURCE_IO) ? "io: " : "mem:", res); | 543 | (res->flags & IORESOURCE_IO) ? "io: " : |
| 544 | ((res->flags & IORESOURCE_PREFETCH)? "pref mem":"mem:"), | ||
| 545 | res); | ||
| 544 | } | 546 | } |
| 545 | } | 547 | } |
| 546 | 548 | ||
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c index 21189447e545..fe95ce20bcbd 100644 --- a/drivers/pci/slot.c +++ b/drivers/pci/slot.c | |||
| @@ -264,8 +264,8 @@ EXPORT_SYMBOL_GPL(pci_create_slot); | |||
| 264 | 264 | ||
| 265 | /** | 265 | /** |
| 266 | * pci_renumber_slot - update %struct pci_slot -> number | 266 | * pci_renumber_slot - update %struct pci_slot -> number |
| 267 | * @slot - %struct pci_slot to update | 267 | * @slot: &struct pci_slot to update |
| 268 | * @slot_nr - new number for slot | 268 | * @slot_nr: new number for slot |
| 269 | * | 269 | * |
| 270 | * The primary purpose of this interface is to allow callers who earlier | 270 | * The primary purpose of this interface is to allow callers who earlier |
| 271 | * created a placeholder slot in pci_create_slot() by passing a -1 as | 271 | * created a placeholder slot in pci_create_slot() by passing a -1 as |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index e4d08c1b2e0b..616bf8b3c8b5 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
| @@ -376,6 +376,7 @@ | |||
| 376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ | 376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ |
| 377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ | 377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ |
| 378 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ | 378 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ |
| 379 | #define PCI_EXP_TYPE_RC_EC 0x10 /* Root Complex Event Collector */ | ||
| 379 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ | 380 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ |
| 380 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ | 381 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ |
| 381 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ | 382 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ |
