aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-21 19:21:08 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-21 19:21:08 -0500
commitb8967d8883aadf36351b568c1f1301ad3f46fc3d (patch)
tree716bb8c4516d10e27a5ba5e939ae4aff0370c892
parentc6b083466818e674d479cfeb847061a57658bcba (diff)
parent79df4c60c5b24ebc90f591d5991b22782813fcfe (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: PCI: Fix wrong reference counter check for proc_dir_entry PCI: fix up setup-bus.c #ifdef PCI: don't load acpi_php when acpi is disabled PCI: quirks: set 'En' bit of MSI Mapping for devices onHT-based nvidia platform PCI: kernel-doc: fix pci-acpi warning PCI: irq: patch for Intel ICH10 DeviceID's PCI: pci_ids: patch for Intel ICH10 DeviceID's PCI: AMD SATA IDE mode quirk PCI: drivers/pcmcia/i82092.c: fix up after pci_bus_region changes PCI: hotplug: acpiphp_ibm: Remove get device information
-rw-r--r--arch/x86/kernel/acpi/boot.c3
-rw-r--r--arch/x86/pci/irq.c4
-rw-r--r--drivers/pci/hotplug/acpiphp_core.c6
-rw-r--r--drivers/pci/hotplug/acpiphp_ibm.c33
-rw-r--r--drivers/pci/pci-acpi.c1
-rw-r--r--drivers/pci/proc.c2
-rw-r--r--drivers/pci/quirks.c79
-rw-r--r--drivers/pci/setup-bus.c6
-rw-r--r--drivers/pcmcia/i82092.c7
-rw-r--r--include/linux/pci_ids.h6
10 files changed, 117 insertions, 30 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 680b7300a489..2cdc9de9371d 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -72,7 +72,8 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return
72#define PREFIX "ACPI: " 72#define PREFIX "ACPI: "
73 73
74int acpi_noirq; /* skip ACPI IRQ initialization */ 74int acpi_noirq; /* skip ACPI IRQ initialization */
75int acpi_pci_disabled __initdata; /* skip ACPI PCI scan and IRQ initialization */ 75int acpi_pci_disabled; /* skip ACPI PCI scan and IRQ initialization */
76EXPORT_SYMBOL(acpi_pci_disabled);
76int acpi_ht __initdata = 1; /* enable HT */ 77int acpi_ht __initdata = 1; /* enable HT */
77 78
78int acpi_lapic; 79int acpi_lapic;
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c
index ed07ce6c171b..a8715861877e 100644
--- a/arch/x86/pci/irq.c
+++ b/arch/x86/pci/irq.c
@@ -583,6 +583,10 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route
583 case PCI_DEVICE_ID_INTEL_ICH9_4: 583 case PCI_DEVICE_ID_INTEL_ICH9_4:
584 case PCI_DEVICE_ID_INTEL_ICH9_5: 584 case PCI_DEVICE_ID_INTEL_ICH9_5:
585 case PCI_DEVICE_ID_INTEL_TOLAPAI_0: 585 case PCI_DEVICE_ID_INTEL_TOLAPAI_0:
586 case PCI_DEVICE_ID_INTEL_ICH10_0:
587 case PCI_DEVICE_ID_INTEL_ICH10_1:
588 case PCI_DEVICE_ID_INTEL_ICH10_2:
589 case PCI_DEVICE_ID_INTEL_ICH10_3:
586 r->name = "PIIX/ICH"; 590 r->name = "PIIX/ICH";
587 r->get = pirq_piix_get; 591 r->get = pirq_piix_get;
588 r->set = pirq_piix_set; 592 r->set = pirq_piix_set;
diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c
index c8c263875c21..9279d5ba62e6 100644
--- a/drivers/pci/hotplug/acpiphp_core.c
+++ b/drivers/pci/hotplug/acpiphp_core.c
@@ -392,6 +392,9 @@ static int __init acpiphp_init(void)
392{ 392{
393 info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); 393 info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
394 394
395 if (acpi_pci_disabled)
396 return 0;
397
395 acpiphp_debug = debug; 398 acpiphp_debug = debug;
396 399
397 /* read all the ACPI info from the system */ 400 /* read all the ACPI info from the system */
@@ -401,6 +404,9 @@ static int __init acpiphp_init(void)
401 404
402static void __exit acpiphp_exit(void) 405static void __exit acpiphp_exit(void)
403{ 406{
407 if (acpi_pci_disabled)
408 return;
409
404 /* deallocate internal data structures etc. */ 410 /* deallocate internal data structures etc. */
405 acpiphp_glue_exit(); 411 acpiphp_glue_exit();
406} 412}
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
index 750ebd7a4c10..b0a22b92717e 100644
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -395,33 +395,34 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
395{ 395{
396 acpi_handle *phandle = (acpi_handle *)context; 396 acpi_handle *phandle = (acpi_handle *)context;
397 acpi_status status; 397 acpi_status status;
398 struct acpi_device_info info; 398 struct acpi_device_info *info;
399 struct acpi_buffer info_buffer = { 399 struct acpi_buffer info_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
400 .length = sizeof(struct acpi_device_info), 400 int retval = 0;
401 .pointer = &info,
402 };
403 401
404 status = acpi_get_object_info(handle, &info_buffer); 402 status = acpi_get_object_info(handle, &info_buffer);
405 if (ACPI_FAILURE(status)) { 403 if (ACPI_FAILURE(status)) {
406 err("%s: Failed to get device information\n", __FUNCTION__); 404 err("%s: Failed to get device information status=0x%x\n",
407 return 0; 405 __FUNCTION__, status);
406 return retval;
408 } 407 }
409 info.hardware_id.value[sizeof(info.hardware_id.value) - 1] = '\0'; 408 info = info_buffer.pointer;
410 409 info->hardware_id.value[sizeof(info->hardware_id.value) - 1] = '\0';
411 if (info.current_status && (info.valid & ACPI_VALID_HID) && 410
412 (!strcmp(info.hardware_id.value, IBM_HARDWARE_ID1) || 411 if (info->current_status && (info->valid & ACPI_VALID_HID) &&
413 !strcmp(info.hardware_id.value, IBM_HARDWARE_ID2))) { 412 (!strcmp(info->hardware_id.value, IBM_HARDWARE_ID1) ||
414 dbg("found hardware: %s, handle: %p\n", info.hardware_id.value, 413 !strcmp(info->hardware_id.value, IBM_HARDWARE_ID2))) {
415 handle); 414 dbg("found hardware: %s, handle: %p\n",
415 info->hardware_id.value, handle);
416 *phandle = handle; 416 *phandle = handle;
417 /* returning non-zero causes the search to stop 417 /* returning non-zero causes the search to stop
418 * and returns this value to the caller of 418 * and returns this value to the caller of
419 * acpi_walk_namespace, but it also causes some warnings 419 * acpi_walk_namespace, but it also causes some warnings
420 * in the acpi debug code to print... 420 * in the acpi debug code to print...
421 */ 421 */
422 return FOUND_APCI; 422 retval = FOUND_APCI;
423 } 423 }
424 return 0; 424 kfree(info);
425 return retval;
425} 426}
426 427
427static int __init ibm_acpiphp_init(void) 428static int __init ibm_acpiphp_init(void)
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index e569645d59e2..2f2d308c9aa3 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -158,6 +158,7 @@ run_osc_out:
158/** 158/**
159 * __pci_osc_support_set - register OS support to Firmware 159 * __pci_osc_support_set - register OS support to Firmware
160 * @flags: OS support bits 160 * @flags: OS support bits
161 * @hid: hardware ID
161 * 162 *
162 * Update OS support fields and doing a _OSC Query to obtain an update 163 * Update OS support fields and doing a _OSC Query to obtain an update
163 * from Firmware on supported control bits. 164 * from Firmware on supported control bits.
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 68aeeb7206de..ef18fcd641e2 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -422,7 +422,7 @@ int pci_proc_detach_device(struct pci_dev *dev)
422 struct proc_dir_entry *e; 422 struct proc_dir_entry *e;
423 423
424 if ((e = dev->procent)) { 424 if ((e = dev->procent)) {
425 if (atomic_read(&e->count)) 425 if (atomic_read(&e->count) > 1)
426 return -EBUSY; 426 return -EBUSY;
427 remove_proc_entry(e->name, dev->bus->procdir); 427 remove_proc_entry(e->name, dev->bus->procdir);
428 dev->procent = NULL; 428 dev->procent = NULL;
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 0a953d43b9a2..bbad4a9f264f 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -867,13 +867,13 @@ static void quirk_disable_pxb(struct pci_dev *pdev)
867DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb); 867DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb);
868DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb); 868DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb);
869 869
870 870static void __devinit quirk_amd_ide_mode(struct pci_dev *pdev)
871static void __devinit quirk_sb600_sata(struct pci_dev *pdev)
872{ 871{
873 /* set sb600 sata to ahci mode */ 872 /* set sb600/sb700/sb800 sata to ahci mode */
874 if ((pdev->class >> 8) == PCI_CLASS_STORAGE_IDE) { 873 u8 tmp;
875 u8 tmp;
876 874
875 pci_read_config_byte(pdev, PCI_CLASS_DEVICE, &tmp);
876 if (tmp == 0x01) {
877 pci_read_config_byte(pdev, 0x40, &tmp); 877 pci_read_config_byte(pdev, 0x40, &tmp);
878 pci_write_config_byte(pdev, 0x40, tmp|1); 878 pci_write_config_byte(pdev, 0x40, tmp|1);
879 pci_write_config_byte(pdev, 0x9, 1); 879 pci_write_config_byte(pdev, 0x9, 1);
@@ -881,10 +881,13 @@ static void __devinit quirk_sb600_sata(struct pci_dev *pdev)
881 pci_write_config_byte(pdev, 0x40, tmp); 881 pci_write_config_byte(pdev, 0x40, tmp);
882 882
883 pdev->class = PCI_CLASS_STORAGE_SATA_AHCI; 883 pdev->class = PCI_CLASS_STORAGE_SATA_AHCI;
884 dev_info(&pdev->dev, "set SATA to AHCI mode\n");
884 } 885 }
885} 886}
886DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_sb600_sata); 887DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_amd_ide_mode);
887DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_sb600_sata); 888DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_amd_ide_mode);
889DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode);
890DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode);
888 891
889/* 892/*
890 * Serverworks CSB5 IDE does not fully support native mode 893 * Serverworks CSB5 IDE does not fully support native mode
@@ -1775,6 +1778,68 @@ static void __devinit quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev)
1775DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, 1778DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
1776 quirk_nvidia_ck804_msi_ht_cap); 1779 quirk_nvidia_ck804_msi_ht_cap);
1777 1780
1781/*
1782 * Force enable MSI mapping capability on HT bridges */
1783static inline void ht_enable_msi_mapping(struct pci_dev *dev)
1784{
1785 int pos, ttl = 48;
1786
1787 pos = pci_find_ht_capability(dev, HT_CAPTYPE_MSI_MAPPING);
1788 while (pos && ttl--) {
1789 u8 flags;
1790
1791 if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS,
1792 &flags) == 0) {
1793 dev_info(&dev->dev, "Enabling HT MSI Mapping\n");
1794
1795 pci_write_config_byte(dev, pos + HT_MSI_FLAGS,
1796 flags | HT_MSI_FLAGS_ENABLE);
1797 }
1798 pos = pci_find_next_ht_capability(dev, pos,
1799 HT_CAPTYPE_MSI_MAPPING);
1800 }
1801}
1802
1803static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev)
1804{
1805 struct pci_dev *host_bridge;
1806 int pos, ttl = 48;
1807
1808 /*
1809 * HT MSI mapping should be disabled on devices that are below
1810 * a non-Hypertransport host bridge. Locate the host bridge...
1811 */
1812 host_bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0));
1813 if (host_bridge == NULL) {
1814 dev_warn(&dev->dev,
1815 "nv_msi_ht_cap_quirk didn't locate host bridge\n");
1816 return;
1817 }
1818
1819 pos = pci_find_ht_capability(host_bridge, HT_CAPTYPE_SLAVE);
1820 if (pos != 0) {
1821 /* Host bridge is to HT */
1822 ht_enable_msi_mapping(dev);
1823 return;
1824 }
1825
1826 /* Host bridge is not to HT, disable HT MSI mapping on this device */
1827 pos = pci_find_ht_capability(dev, HT_CAPTYPE_MSI_MAPPING);
1828 while (pos && ttl--) {
1829 u8 flags;
1830
1831 if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS,
1832 &flags) == 0) {
1833 dev_info(&dev->dev, "Quirk disabling HT MSI mapping");
1834 pci_write_config_byte(dev, pos + HT_MSI_FLAGS,
1835 flags & ~HT_MSI_FLAGS_ENABLE);
1836 }
1837 pos = pci_find_next_ht_capability(dev, pos,
1838 HT_CAPTYPE_MSI_MAPPING);
1839 }
1840}
1841DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, nv_msi_ht_cap_quirk);
1842
1778static void __devinit quirk_msi_intx_disable_bug(struct pci_dev *dev) 1843static void __devinit quirk_msi_intx_disable_bug(struct pci_dev *dev)
1779{ 1844{
1780 dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG; 1845 dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 262b0439abe9..125e7b7f34ff 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -206,10 +206,8 @@ pci_setup_bridge(struct pci_bus *bus)
206 if (bus->resource[2]->flags & IORESOURCE_PREFETCH) { 206 if (bus->resource[2]->flags & IORESOURCE_PREFETCH) {
207 l = (region.start >> 16) & 0xfff0; 207 l = (region.start >> 16) & 0xfff0;
208 l |= region.end & 0xfff00000; 208 l |= region.end & 0xfff00000;
209#ifdef CONFIG_RESOURCES_64BIT 209 bu = upper_32_bits(region.start);
210 bu = region.start >> 32; 210 lu = upper_32_bits(region.end);
211 lu = region.end >> 32;
212#endif
213 DBG(KERN_INFO " PREFETCH window: 0x%016llx-0x%016llx\n", 211 DBG(KERN_INFO " PREFETCH window: 0x%016llx-0x%016llx\n",
214 (unsigned long long)region.start, 212 (unsigned long long)region.start,
215 (unsigned long long)region.end); 213 (unsigned long long)region.end);
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c
index 749515534cc0..e54ecc580d9e 100644
--- a/drivers/pcmcia/i82092.c
+++ b/drivers/pcmcia/i82092.c
@@ -647,7 +647,12 @@ static int i82092aa_set_mem_map(struct pcmcia_socket *socket, struct pccard_mem_
647 if ( (mem->card_start > 0x3ffffff) || (region.start > region.end) || 647 if ( (mem->card_start > 0x3ffffff) || (region.start > region.end) ||
648 (mem->speed > 1000) ) { 648 (mem->speed > 1000) ) {
649 leave("i82092aa_set_mem_map: invalid address / speed"); 649 leave("i82092aa_set_mem_map: invalid address / speed");
650 printk("invalid mem map for socket %i : %lx to %lx with a start of %x \n",sock,region.start, region.end, mem->card_start); 650 printk("invalid mem map for socket %i: %llx to %llx with a "
651 "start of %x\n",
652 sock,
653 (unsigned long long)region.start,
654 (unsigned long long)region.end,
655 mem->card_start);
651 return -EINVAL; 656 return -EINVAL;
652 } 657 }
653 658
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 0519e53d5eb2..effdb558a588 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2374,6 +2374,12 @@
2374#define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a 2374#define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a
2375#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e 2375#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e
2376#define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b 2376#define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b
2377#define PCI_DEVICE_ID_INTEL_ICH10_0 0x3a14
2378#define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16
2379#define PCI_DEVICE_ID_INTEL_ICH10_2 0x3a18
2380#define PCI_DEVICE_ID_INTEL_ICH10_3 0x3a1a
2381#define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30
2382#define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60
2377#define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f 2383#define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f
2378#define PCI_DEVICE_ID_INTEL_IOAT_SCNB 0x65ff 2384#define PCI_DEVICE_ID_INTEL_IOAT_SCNB 0x65ff
2379#define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031 2385#define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031