diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-24 15:34:09 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-24 15:34:09 -0700 |
commit | 4a076f7ffaae89e3f1c2ffecd147b79ae1e0bd9d (patch) | |
tree | 86bd89054c44670a82f2cfa1f7373cfc0898245c /pci | |
parent | 67c67eb735d985aadf3d63200ebb59147b9fa100 (diff) | |
download | patches-4a076f7ffaae89e3f1c2ffecd147b79ae1e0bd9d.tar.gz |
lotsa patches added
Diffstat (limited to 'pci')
8 files changed, 363 insertions, 4 deletions
diff --git a/pci/pci-documentation-no-more-device-ids.patch b/pci/pci-documentation-no-more-device-ids.patch new file mode 100644 index 0000000000000..c686a53d36b94 --- /dev/null +++ b/pci/pci-documentation-no-more-device-ids.patch @@ -0,0 +1,44 @@ +From owner-linux-pci@atrey.karlin.mff.cuni.cz Tue Apr 18 02:21:16 2006 +From: Ingo Oeser <netdev@axxeo.de> +To: Greg Kroah-Hartmann <gregkh@suse.de> +Subject: PCI: Documentation: no more device ids +Date: Tue, 18 Apr 2006 11:20:55 +0200 +Cc: Jeff Garzik <jgarzik@pobox.com> +Content-Disposition: inline +Message-Id: <200604181120.55783.netdev@axxeo.de> + +From: Ingo Oeser <netdev@axxeo.de> + +Document that we don't like to add more PCI device ids +but are happy to accept PCI vendor ids for linux/include/pci_ids.h + +Original text from Jeff Garzik. + +Signed-off-by: Ingo Oeser <netdev@axxeo.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + Documentation/pci.txt | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +--- gregkh-2.6.orig/Documentation/pci.txt ++++ gregkh-2.6/Documentation/pci.txt +@@ -259,7 +259,17 @@ on the bus need to be capable of doing i + to be handled by platform and generic code, not individual drivers. + + +-8. Obsolete functions ++8. Vendor and device identifications ++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++For the future, let's avoid adding device ids to include/linux/pci_ids.h. ++ ++PCI_VENDOR_ID_xxx for vendors, and a hex constant for device ids. ++ ++Rationale: PCI_VENDOR_ID_xxx constants are re-used, but device ids are not. ++ Further, device ids are arbitrary hex numbers, normally used only in a ++ single location, the pci_device_id table. ++ ++9. Obsolete functions + ~~~~~~~~~~~~~~~~~~~~~ + There are several functions which you might come across when trying to + port an old driver to the new PCI interface. They are no longer present diff --git a/pci/pci-error-handling-on-pci-device-resume.patch b/pci/pci-error-handling-on-pci-device-resume.patch new file mode 100644 index 0000000000000..ca798111255ab --- /dev/null +++ b/pci/pci-error-handling-on-pci-device-resume.patch @@ -0,0 +1,63 @@ +From owner-linux-pci@atrey.karlin.mff.cuni.cz Tue Apr 18 05:50:02 2006 +Date: Tue, 18 Apr 2006 14:49:56 +0200 +From: Jean Delvare <khali@linux-fr.org> +To: Greg KH <gregkh@suse.de> +Subject: PCI: Error handling on PCI device resume +Message-Id: <20060418144956.7643e844.khali@linux-fr.org> + +We currently don't handle errors properly when resuming a PCI device: +* In pci_default_resume() we capture the error code returned by + pci_enable_device() but don't pass it up to the caller. + Introduced by commit 95a629657dbe28e44a312c47815b3dc3f1ce0970 +* In pci_resume_device(), the errors possibly returned by the driver's + .resume method or by the generic pci_default_resume() function are + ignored. + +This patch fixes both issues. + +Signed-off-by: Jean Delvare <khali@linux-fr.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pci/pci-driver.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +--- gregkh-2.6.orig/drivers/pci/pci-driver.c ++++ gregkh-2.6/drivers/pci/pci-driver.c +@@ -285,9 +285,9 @@ static int pci_device_suspend(struct dev + * Default resume method for devices that have no driver provided resume, + * or not even a driver at all. + */ +-static void pci_default_resume(struct pci_dev *pci_dev) ++static int pci_default_resume(struct pci_dev *pci_dev) + { +- int retval; ++ int retval = 0; + + /* restore the PCI config space */ + pci_restore_state(pci_dev); +@@ -298,18 +298,21 @@ static void pci_default_resume(struct pc + /* if the device was busmaster before the suspend, make it busmaster again */ + if (pci_dev->is_busmaster) + pci_set_master(pci_dev); ++ ++ return retval; + } + + static int pci_device_resume(struct device * dev) + { ++ int error; + struct pci_dev * pci_dev = to_pci_dev(dev); + struct pci_driver * drv = pci_dev->driver; + + if (drv && drv->resume) +- drv->resume(pci_dev); ++ error = drv->resume(pci_dev); + else +- pci_default_resume(pci_dev); +- return 0; ++ error = pci_default_resume(pci_dev); ++ return error; + } + + static void pci_device_shutdown(struct device *dev) diff --git a/pci/pci-fix-potential-resource-leak-in-drivers-pci-msi.c.patch b/pci/pci-fix-potential-resource-leak-in-drivers-pci-msi.c.patch new file mode 100644 index 0000000000000..890b5bbc77b7c --- /dev/null +++ b/pci/pci-fix-potential-resource-leak-in-drivers-pci-msi.c.patch @@ -0,0 +1,35 @@ +From linux-kernel-owner@vger.kernel.org Sun Apr 16 19:04:07 2006 +From: Jesper Juhl <jesper.juhl@gmail.com> +To: linux-kernel@vger.kernel.org +Subject: PCI: fix potential resource leak in drivers/pci/msi.c +Date: Mon, 17 Apr 2006 04:02:54 +0200 +Cc: Tom Long Nguyen <tom.l.nguyen@intel.com>, Jesper Juhl <jesper.juhl@gmail.com> +Content-Disposition: inline +Message-Id: <200604170402.54458.jesper.juhl@gmail.com> + +The coverity checker spotted (as entry #599) that we might leak `entry' in +drivers/pci/msi.c::msix_capability_init() +This patch should take care of that. + + +Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pci/msi.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- gregkh-2.6.orig/drivers/pci/msi.c ++++ gregkh-2.6/drivers/pci/msi.c +@@ -793,8 +793,10 @@ static int msix_capability_init(struct p + if (!entry) + break; + vector = get_msi_vector(dev); +- if (vector < 0) ++ if (vector < 0) { ++ kmem_cache_free(msi_cachep, entry); + break; ++ } + + j = entries[i].entry; + entries[i].vector = vector; diff --git a/pci/pci-hotplug-don-t-use-acpi_os_free.patch b/pci/pci-hotplug-don-t-use-acpi_os_free.patch new file mode 100644 index 0000000000000..2a99940c199ef --- /dev/null +++ b/pci/pci-hotplug-don-t-use-acpi_os_free.patch @@ -0,0 +1,113 @@ +From kristen.c.accardi@intel.com Tue Apr 18 14:27:56 2006 +Subject: PCI Hotplug: don't use acpi_os_free +From: Kristen Accardi <kristen.c.accardi@intel.com> +Cc: <len.brown@intel.com> +Date: Tue, 18 Apr 2006 14:36:43 -0700 +Message-Id: <1145396204.10783.81.camel@whizzy> + +acpi_os_free should not be used by drivers outside +of acpi/*/*.c. Replace with kfree(). + +Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pci/hotplug/acpi_pcihp.c | 16 ++++++++-------- + drivers/pci/hotplug/acpiphp_glue.c | 2 +- + drivers/pci/hotplug/pciehp_hpc.c | 4 ++-- + 3 files changed, 11 insertions(+), 11 deletions(-) + +--- gregkh-2.6.orig/drivers/pci/hotplug/acpi_pcihp.c ++++ gregkh-2.6/drivers/pci/hotplug/acpi_pcihp.c +@@ -58,7 +58,7 @@ acpi_run_hpp(acpi_handle handle, struct + if (!ret_buf.pointer) { + printk(KERN_ERR "%s:%s alloc for _HPP fail\n", + __FUNCTION__, (char *)string.pointer); +- acpi_os_free(string.pointer); ++ kfree(string.pointer); + return AE_NO_MEMORY; + } + status = acpi_evaluate_object(handle, METHOD_NAME__HPP, +@@ -69,7 +69,7 @@ acpi_run_hpp(acpi_handle handle, struct + if (ACPI_FAILURE(status)) { + pr_debug("%s:%s _HPP fail=0x%x\n", __FUNCTION__, + (char *)string.pointer, status); +- acpi_os_free(string.pointer); ++ kfree(string.pointer); + return status; + } + } +@@ -109,8 +109,8 @@ acpi_run_hpp(acpi_handle handle, struct + pr_debug(" _HPP: enable PERR =0x%x\n", hpp->enable_perr); + + free_and_return: +- acpi_os_free(string.pointer); +- acpi_os_free(ret_buf.pointer); ++ kfree(string.pointer); ++ kfree(ret_buf.pointer); + return status; + } + +@@ -136,7 +136,7 @@ acpi_status acpi_run_oshp(acpi_handle ha + pr_debug("%s:%s OSHP passes\n", __FUNCTION__, + (char *)string.pointer); + +- acpi_os_free(string.pointer); ++ kfree(string.pointer); + return status; + } + EXPORT_SYMBOL_GPL(acpi_run_oshp); +@@ -192,19 +192,19 @@ int acpi_root_bridge(acpi_handle handle) + if ((info->valid & ACPI_VALID_HID) && + !strcmp(PCI_ROOT_HID_STRING, + info->hardware_id.value)) { +- acpi_os_free(buffer.pointer); ++ kfree(buffer.pointer); + return 1; + } + if (info->valid & ACPI_VALID_CID) { + for (i=0; i < info->compatibility_id.count; i++) { + if (!strcmp(PCI_ROOT_HID_STRING, + info->compatibility_id.id[i].value)) { +- acpi_os_free(buffer.pointer); ++ kfree(buffer.pointer); + return 1; + } + } + } +- acpi_os_free(buffer.pointer); ++ kfree(buffer.pointer); + } + return 0; + } +--- gregkh-2.6.orig/drivers/pci/hotplug/acpiphp_glue.c ++++ gregkh-2.6/drivers/pci/hotplug/acpiphp_glue.c +@@ -715,7 +715,7 @@ static int get_gsi_base(acpi_handle hand + break; + } + out: +- acpi_os_free(buffer.pointer); ++ kfree(buffer.pointer); + return result; + } + +--- gregkh-2.6.orig/drivers/pci/hotplug/pciehp_hpc.c ++++ gregkh-2.6/drivers/pci/hotplug/pciehp_hpc.c +@@ -1288,7 +1288,7 @@ int pciehp_acpi_get_hp_hw_control_from_f + if (ACPI_SUCCESS(status)) { + dbg("Gained control for hotplug HW for pci %s (%s)\n", + pci_name(dev), (char *)string.pointer); +- acpi_os_free(string.pointer); ++ kfree(string.pointer); + return 0; + } + if (acpi_root_bridge(handle)) +@@ -1302,7 +1302,7 @@ int pciehp_acpi_get_hp_hw_control_from_f + err("Cannot get control of hotplug hardware for pci %s\n", + pci_name(dev)); + +- acpi_os_free(string.pointer); ++ kfree(string.pointer); + return -1; + } + #endif diff --git a/pci/pci-hotplug-make-acpiphp_glue.c-handle_hotplug_event_func-static.patch b/pci/pci-hotplug-make-acpiphp_glue.c-handle_hotplug_event_func-static.patch new file mode 100644 index 0000000000000..640986857a399 --- /dev/null +++ b/pci/pci-hotplug-make-acpiphp_glue.c-handle_hotplug_event_func-static.patch @@ -0,0 +1,60 @@ +From bunk@stusta.de Tue Apr 18 15:10:34 2006 +Date: Wed, 19 Apr 2006 00:10:26 +0200 +From: Adrian Bunk <bunk@stusta.de> +To: Andrew Morton <akpm@osdl.org>, Kristen Accardi <kristen.c.accardi@intel.com> +Subject: PCI Hotplug: make acpiphp_glue.c:handle_hotplug_event_func() static +Message-ID: <20060418221026.GV11582@stusta.de> +Content-Disposition: inline + +On Tue, Apr 18, 2006 at 03:14:23AM -0700, Andrew Morton wrote: +>... +> Changes since 2.6.17-rc1-mm2: +>... +> +acpiphp-use-new-dock-driver.patch +>... +> ACPI fixes and features +>... + +handle_hotplug_event_func() can now become static. + +Signed-off-by: Adrian Bunk <bunk@stusta.de> +Cc: Kristen Accardi <kristen.c.accardi@intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/pci/hotplug/acpiphp.h | 1 - + drivers/pci/hotplug/acpiphp_glue.c | 5 ++++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/pci/hotplug/acpiphp.h ++++ gregkh-2.6/drivers/pci/hotplug/acpiphp.h +@@ -226,7 +226,6 @@ extern int acpiphp_glue_init (void); + extern void acpiphp_glue_exit (void); + extern int acpiphp_get_num_slots (void); + typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data); +-void handle_hotplug_event_func(acpi_handle, u32, void*); + + extern int acpiphp_enable_slot (struct acpiphp_slot *slot); + extern int acpiphp_disable_slot (struct acpiphp_slot *slot); +--- gregkh-2.6.orig/drivers/pci/hotplug/acpiphp_glue.c ++++ gregkh-2.6/drivers/pci/hotplug/acpiphp_glue.c +@@ -59,6 +59,8 @@ static LIST_HEAD(bridge_list); + static void handle_hotplug_event_bridge (acpi_handle, u32, void *); + static void acpiphp_sanitize_bus(struct pci_bus *bus); + static void acpiphp_set_hpp_values(acpi_handle handle, struct pci_bus *bus); ++static void handle_hotplug_event_func(acpi_handle handle, u32 type, ++ void *context); + + + /* +@@ -1432,7 +1434,8 @@ static void handle_hotplug_event_bridge( + * handles ACPI event notification on slots + * + */ +-void handle_hotplug_event_func(acpi_handle handle, u32 type, void *context) ++static void handle_hotplug_event_func(acpi_handle handle, u32 type, ++ void *context) + { + struct acpiphp_func *func; + char objname[64]; diff --git a/pci/pci-legacy-i-o-port-free-driver-update-documentation-pci_txt.patch b/pci/pci-legacy-i-o-port-free-driver-update-documentation-pci_txt.patch index 7956dc154be83..43572c5b75ebb 100644 --- a/pci/pci-legacy-i-o-port-free-driver-update-documentation-pci_txt.patch +++ b/pci/pci-legacy-i-o-port-free-driver-update-documentation-pci_txt.patch @@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- gregkh-2.6.orig/Documentation/pci.txt +++ gregkh-2.6/Documentation/pci.txt -@@ -269,3 +269,70 @@ having sane locking. +@@ -279,3 +279,70 @@ having sane locking. pci_find_device() Superseded by pci_get_device() pci_find_subsys() Superseded by pci_get_subsys() pci_find_slot() Superseded by pci_get_slot() diff --git a/pci/pci-msi-abstractions-and-support-for-altix.patch b/pci/pci-msi-abstractions-and-support-for-altix.patch index dc8dd851f81f9..9ef90dd149b27 100644 --- a/pci/pci-msi-abstractions-and-support-for-altix.patch +++ b/pci/pci-msi-abstractions-and-support-for-altix.patch @@ -495,7 +495,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> int vector, pos, i, j, nr_entries, temp = 0; unsigned long phys_addr; u32 table_offset; -@@ -820,18 +865,20 @@ static int msix_capability_init(struct p +@@ -822,18 +867,20 @@ static int msix_capability_init(struct p /* Replace with MSI-X handler */ irq_handler_init(PCI_CAP_ID_MSIX, vector, 1); /* Configure MSI-X capability structure */ @@ -524,7 +524,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> base + j * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_DATA_OFFSET); attach_msi_entry(entry, vector); -@@ -899,9 +946,10 @@ int pci_enable_msi(struct pci_dev* dev) +@@ -901,9 +948,10 @@ int pci_enable_msi(struct pci_dev* dev) vector_irq[dev->irq] = -1; nr_released_vectors--; spin_unlock_irqrestore(&msi_lock, flags); @@ -538,7 +538,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } spin_unlock_irqrestore(&msi_lock, flags); dev->irq = temp; -@@ -978,6 +1026,8 @@ static int msi_free_vector(struct pci_de +@@ -980,6 +1028,8 @@ static int msi_free_vector(struct pci_de void __iomem *base; unsigned long flags; diff --git a/pci/pci-quirk-via-irq-fixup-should-only-run-for-via-southbridges.patch b/pci/pci-quirk-via-irq-fixup-should-only-run-for-via-southbridges.patch new file mode 100644 index 0000000000000..e331957d6847b --- /dev/null +++ b/pci/pci-quirk-via-irq-fixup-should-only-run-for-via-southbridges.patch @@ -0,0 +1,44 @@ +From linux-kernel-owner@vger.kernel.org Tue Apr 18 23:57:45 2006 +Date: Tue, 18 Apr 2006 23:57:09 -0700 +From: Chris Wedgwood <cw@f00f.org> +Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Andrew Morton <akpm@osdl.org> +Subject: PCI quirk: VIA IRQ fixup should only run for VIA southbridges +Message-ID: <20060419065709.GA8075@taniwha.stupidest.org> +Content-Disposition: inline + +Alan Cox pointed out that the VIA 'IRQ fixup' was erroneously running +on my system which has no VIA southbridge (but I do have a VIA IEEE +1394 device). + +This should address that. I also changed "Via IRQ" to "VIA IRQ" +(initially I read Via as a capitalized via (by way/means of). + + +Signed-off-by: Chris Wedgwood <cw@f00f.org> +Acked-by: Jeff Garzik <jeff@garzik.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pci/quirks.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/pci/quirks.c ++++ gregkh-2.6/drivers/pci/quirks.c +@@ -642,13 +642,15 @@ static void quirk_via_irq(struct pci_dev + new_irq = dev->irq & 0xf; + pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); + if (new_irq != irq) { +- printk(KERN_INFO "PCI: Via IRQ fixup for %s, from %d to %d\n", ++ printk(KERN_INFO "PCI: VIA IRQ fixup for %s, from %d to %d\n", + pci_name(dev), irq, new_irq); + udelay(15); /* unknown if delay really needed */ + pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq); + } + } +-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq); ++DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq); ++DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq); ++DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq); + + /* + * VIA VT82C598 has its device ID settable and many BIOSes |