Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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:
x86 PCI: call dmi_check_pciprobe()
x86/pci: add pci=skip_isa_align command lines.
x86/pci: remove flag in pci_cfg_space_size_ext
x86: fix section mismatch in pci_scan_bus

+86 -66
+2
Documentation/kernel-parameters.txt
··· 1522 1522 This is normally done in pci_enable_device(), 1523 1523 so this option is a temporary workaround 1524 1524 for broken drivers that don't call it. 1525 + skip_isa_align [X86] do not align io start addr, so can 1526 + handle more pci cards 1525 1527 firmware [ARM] Do not re-enumerate the bus but instead 1526 1528 just use the configuration from the 1527 1529 bootloader. This is currently used on
-41
arch/x86/pci/acpi.c
··· 6 6 #include <asm/numa.h> 7 7 #include "pci.h" 8 8 9 - static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d) 10 - { 11 - pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; 12 - printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident); 13 - return 0; 14 - } 15 - 16 - static struct dmi_system_id acpi_pciprobe_dmi_table[] __devinitdata = { 17 - /* 18 - * Systems where PCI IO resource ISA alignment can be skipped 19 - * when the ISA enable bit in the bridge control is not set 20 - */ 21 - { 22 - .callback = can_skip_ioresource_align, 23 - .ident = "IBM System x3800", 24 - .matches = { 25 - DMI_MATCH(DMI_SYS_VENDOR, "IBM"), 26 - DMI_MATCH(DMI_PRODUCT_NAME, "x3800"), 27 - }, 28 - }, 29 - { 30 - .callback = can_skip_ioresource_align, 31 - .ident = "IBM System x3850", 32 - .matches = { 33 - DMI_MATCH(DMI_SYS_VENDOR, "IBM"), 34 - DMI_MATCH(DMI_PRODUCT_NAME, "x3850"), 35 - }, 36 - }, 37 - { 38 - .callback = can_skip_ioresource_align, 39 - .ident = "IBM System x3950", 40 - .matches = { 41 - DMI_MATCH(DMI_SYS_VENDOR, "IBM"), 42 - DMI_MATCH(DMI_PRODUCT_NAME, "x3950"), 43 - }, 44 - }, 45 - {} 46 - }; 47 - 48 9 struct pci_root_info { 49 10 char *name; 50 11 unsigned int res_num; ··· 156 195 #ifdef CONFIG_ACPI_NUMA 157 196 int pxm; 158 197 #endif 159 - 160 - dmi_check_system(acpi_pciprobe_dmi_table); 161 198 162 199 if (domain && !pci_domains_supported) { 163 200 printk(KERN_WARNING "PCI: Multiple domains not supported "
+54 -4
arch/x86/pci/common.c
··· 90 90 rom_r->start = rom_r->end = rom_r->flags = 0; 91 91 } 92 92 93 + static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d) 94 + { 95 + pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; 96 + printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident); 97 + return 0; 98 + } 99 + 100 + static struct dmi_system_id can_skip_pciprobe_dmi_table[] __devinitdata = { 101 + /* 102 + * Systems where PCI IO resource ISA alignment can be skipped 103 + * when the ISA enable bit in the bridge control is not set 104 + */ 105 + { 106 + .callback = can_skip_ioresource_align, 107 + .ident = "IBM System x3800", 108 + .matches = { 109 + DMI_MATCH(DMI_SYS_VENDOR, "IBM"), 110 + DMI_MATCH(DMI_PRODUCT_NAME, "x3800"), 111 + }, 112 + }, 113 + { 114 + .callback = can_skip_ioresource_align, 115 + .ident = "IBM System x3850", 116 + .matches = { 117 + DMI_MATCH(DMI_SYS_VENDOR, "IBM"), 118 + DMI_MATCH(DMI_PRODUCT_NAME, "x3850"), 119 + }, 120 + }, 121 + { 122 + .callback = can_skip_ioresource_align, 123 + .ident = "IBM System x3950", 124 + .matches = { 125 + DMI_MATCH(DMI_SYS_VENDOR, "IBM"), 126 + DMI_MATCH(DMI_PRODUCT_NAME, "x3950"), 127 + }, 128 + }, 129 + {} 130 + }; 131 + 132 + void __init dmi_check_skip_isa_align(void) 133 + { 134 + dmi_check_system(can_skip_pciprobe_dmi_table); 135 + } 136 + 93 137 /* 94 138 * Called after each bus is probed, but before its children 95 139 * are examined. ··· 362 318 {} 363 319 }; 364 320 321 + void __init dmi_check_pciprobe(void) 322 + { 323 + dmi_check_system(pciprobe_dmi_table); 324 + } 325 + 365 326 struct pci_bus * __devinit pcibios_scan_root(int busnum) 366 327 { 367 328 struct pci_bus *bus = NULL; 368 329 struct pci_sysdata *sd; 369 - 370 - dmi_check_system(pciprobe_dmi_table); 371 330 372 331 while ((bus = pci_find_next_bus(bus)) != NULL) { 373 332 if (bus->number == busnum) { ··· 509 462 } else if (!strcmp(str, "routeirq")) { 510 463 pci_routeirq = 1; 511 464 return NULL; 465 + } else if (!strcmp(str, "skip_isa_align")) { 466 + pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; 467 + return NULL; 512 468 } 513 469 return str; 514 470 } ··· 539 489 pcibios_disable_irq(dev); 540 490 } 541 491 542 - struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) 492 + struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) 543 493 { 544 494 struct pci_bus *bus = NULL; 545 495 struct pci_sysdata *sd; ··· 562 512 return bus; 563 513 } 564 514 565 - struct pci_bus *pci_scan_bus_with_sysdata(int busno) 515 + struct pci_bus * __devinit pci_scan_bus_with_sysdata(int busno) 566 516 { 567 517 return pci_scan_bus_on_node(busno, &pci_root_ops, -1); 568 518 }
+1 -1
arch/x86/pci/fixup.c
··· 502 502 */ 503 503 static void fam10h_pci_cfg_space_size(struct pci_dev *dev) 504 504 { 505 - dev->cfg_size = pci_cfg_space_size_ext(dev, 0); 505 + dev->cfg_size = pci_cfg_space_size_ext(dev); 506 506 } 507 507 508 508 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1200, fam10h_pci_cfg_space_size);
+4
arch/x86/pci/init.c
··· 33 33 printk(KERN_ERR 34 34 "PCI: Fatal: No config space access function found\n"); 35 35 36 + dmi_check_pciprobe(); 37 + 38 + dmi_check_skip_isa_align(); 39 + 36 40 return 0; 37 41 } 38 42 arch_initcall(pci_access_init);
+3
arch/x86/pci/pci.h
··· 38 38 pci_dmi_bf, 39 39 }; 40 40 41 + extern void __init dmi_check_pciprobe(void); 42 + extern void __init dmi_check_skip_isa_align(void); 43 + 41 44 /* pci-i386.c */ 42 45 43 46 extern unsigned int pcibios_max_latency;
+19 -18
drivers/pci/probe.c
··· 842 842 * reading the dword at 0x100 which must either be 0 or a valid extended 843 843 * capability header. 844 844 */ 845 - int pci_cfg_space_size_ext(struct pci_dev *dev, unsigned check_exp_pcix) 845 + int pci_cfg_space_size_ext(struct pci_dev *dev) 846 846 { 847 - int pos; 848 847 u32 status; 849 848 850 - if (!check_exp_pcix) 851 - goto skip; 852 - 853 - pos = pci_find_capability(dev, PCI_CAP_ID_EXP); 854 - if (!pos) { 855 - pos = pci_find_capability(dev, PCI_CAP_ID_PCIX); 856 - if (!pos) 857 - goto fail; 858 - 859 - pci_read_config_dword(dev, pos + PCI_X_STATUS, &status); 860 - if (!(status & (PCI_X_STATUS_266MHZ | PCI_X_STATUS_533MHZ))) 861 - goto fail; 862 - } 863 - 864 - skip: 865 849 if (pci_read_config_dword(dev, 256, &status) != PCIBIOS_SUCCESSFUL) 866 850 goto fail; 867 851 if (status == 0xffffffff) ··· 859 875 860 876 int pci_cfg_space_size(struct pci_dev *dev) 861 877 { 862 - return pci_cfg_space_size_ext(dev, 1); 878 + int pos; 879 + u32 status; 880 + 881 + pos = pci_find_capability(dev, PCI_CAP_ID_EXP); 882 + if (!pos) { 883 + pos = pci_find_capability(dev, PCI_CAP_ID_PCIX); 884 + if (!pos) 885 + goto fail; 886 + 887 + pci_read_config_dword(dev, pos + PCI_X_STATUS, &status); 888 + if (!(status & (PCI_X_STATUS_266MHZ | PCI_X_STATUS_533MHZ))) 889 + goto fail; 890 + } 891 + 892 + return pci_cfg_space_size_ext(dev); 893 + 894 + fail: 895 + return PCI_CFG_SPACE_SIZE; 863 896 } 864 897 865 898 static void pci_release_bus_bridge_dev(struct device *dev)
+3 -2
include/linux/pci.h
··· 44 44 #include <linux/mod_devicetable.h> 45 45 46 46 #include <linux/types.h> 47 + #include <linux/init.h> 47 48 #include <linux/ioport.h> 48 49 #include <linux/list.h> 49 50 #include <linux/compiler.h> ··· 475 474 void pci_bus_add_devices(struct pci_bus *bus); 476 475 struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, 477 476 struct pci_ops *ops, void *sysdata); 478 - static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, 477 + static inline struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops, 479 478 void *sysdata) 480 479 { 481 480 struct pci_bus *root_bus; ··· 667 666 668 667 void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), 669 668 void *userdata); 670 - int pci_cfg_space_size_ext(struct pci_dev *dev, unsigned check_exp_pcix); 669 + int pci_cfg_space_size_ext(struct pci_dev *dev); 671 670 int pci_cfg_space_size(struct pci_dev *dev); 672 671 unsigned char pci_bus_max_busnr(struct pci_bus *bus); 673 672