diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-30 16:45:50 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-30 16:45:50 -0700 |
commit | 4f380d9c1d1c3e77a996c2dfaa09daebdce6b257 (patch) | |
tree | b6786a0f524c5532299abc8359d5b8b3e66ff445 /pci | |
parent | 916bf118409d009d6100202823fe1d1e4ed35150 (diff) | |
download | patches-4f380d9c1d1c3e77a996c2dfaa09daebdce6b257.tar.gz |
more patches added
Diffstat (limited to 'pci')
4 files changed, 148 insertions, 2 deletions
diff --git a/pci/msi-blacklist-pci-e-chipsets-depending-on-hypertransport-msi-capabality.patch b/pci/msi-blacklist-pci-e-chipsets-depending-on-hypertransport-msi-capabality.patch index f8779cfdfc0eb..5096955870a80 100644 --- a/pci/msi-blacklist-pci-e-chipsets-depending-on-hypertransport-msi-capabality.patch +++ b/pci/msi-blacklist-pci-e-chipsets-depending-on-hypertransport-msi-capabality.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- gregkh-2.6.orig/drivers/pci/quirks.c +++ gregkh-2.6/drivers/pci/quirks.c -@@ -1519,6 +1519,64 @@ static void __devinit quirk_disable_msi( +@@ -1546,6 +1546,64 @@ static void __devinit quirk_disable_msi( DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_disable_msi); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_disable_msi); diff --git a/pci/msi-merge-existing-msi-disabling-quirks.patch b/pci/msi-merge-existing-msi-disabling-quirks.patch index 0a7512b7e3278..d4a90ddce7007 100644 --- a/pci/msi-merge-existing-msi-disabling-quirks.patch +++ b/pci/msi-merge-existing-msi-disabling-quirks.patch @@ -47,7 +47,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #endif /* CONFIG_X86_IO_APIC */ -@@ -1518,6 +1505,22 @@ static void __devinit quirk_nvidia_ck804 +@@ -1545,6 +1532,22 @@ static void __devinit quirk_nvidia_ck804 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, quirk_nvidia_ck804_pcie_aer_ext_cap); diff --git a/pci/pci-clear-abnormal-poweroff-flag-on-via-southbridges-fix-resume.patch b/pci/pci-clear-abnormal-poweroff-flag-on-via-southbridges-fix-resume.patch new file mode 100644 index 0000000000000..f11b25479b865 --- /dev/null +++ b/pci/pci-clear-abnormal-poweroff-flag-on-via-southbridges-fix-resume.patch @@ -0,0 +1,66 @@ +From akpm@osdl.org Fri Jun 30 16:31:13 2006 +Message-Id: <200606300931.k5U9VPjg001630@shell0.pdx.osdl.net> +From: Matthew Garrett <mjg59@srcf.ucam.org> +Subject: PCI: Clear abnormal poweroff flag on VIA southbridges, fix resume +To: greg@kroah.com +Cc: akpm@osdl.org, mjg59@srcf.ucam.org, len.brown@intel.com, luming.yu@intel.com +Date: Fri, 30 Jun 2006 02:31:25 -0700 + +From: Matthew Garrett <mjg59@srcf.ucam.org> + +Some VIA southbridges contain a flag in the ACPI register space that +indicates whether an abnormal poweroff has occured, presumably with the +intention that it can be cleared on clean shutdown. Some BIOSes check this +flag at resume time, and will re-POST the system rather than jump back to +the OS if it's set. Clearing it at boot time appears to be sufficient. +I'm not sure if drivers/pci/quirks.c is the right place to do it, but I'm +not sure where would be cleaner. + +[akpm@osdl.org: cleanups, build fix] +Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> +Cc: Greg KH <greg@kroah.com> +Cc: "Brown, Len" <len.brown@intel.com> +Cc: "Yu, Luming" <luming.yu@intel.com> +Signed-off-by: Andrew Morton <akpm@osdl.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pci/quirks.c | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +--- gregkh-2.6.orig/drivers/pci/quirks.c ++++ gregkh-2.6/drivers/pci/quirks.c +@@ -683,6 +683,33 @@ static void __devinit quirk_vt82c598_id( + } + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_vt82c598_id ); + ++#ifdef CONFIG_ACPI_SLEEP ++ ++/* ++ * Some VIA systems boot with the abnormal status flag set. This can cause ++ * the BIOS to re-POST the system on resume rather than passing control ++ * back to the OS. Clear the flag on boot ++ */ ++static void __devinit quirk_via_abnormal_poweroff(struct pci_dev *dev) ++{ ++ u32 reg; ++ ++ acpi_hw_register_read(ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_STATUS, ++ ®); ++ ++ if (reg & 0x800) { ++ printk("Clearing abnormal poweroff flag\n"); ++ acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, ++ ACPI_REGISTER_PM1_STATUS, ++ (u16)0x800); ++ } ++} ++ ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, quirk_via_abnormal_poweroff); ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, quirk_via_abnormal_poweroff); ++ ++#endif ++ + /* + * CardBus controllers have a legacy base address that enables them + * to respond as i82365 pcmcia controllers. We don't want them to diff --git a/pci/resources-insert-identical-resources-above-existing-resources.patch b/pci/resources-insert-identical-resources-above-existing-resources.patch new file mode 100644 index 0000000000000..05c2541741919 --- /dev/null +++ b/pci/resources-insert-identical-resources-above-existing-resources.patch @@ -0,0 +1,80 @@ +From akpm@osdl.org Fri Jun 30 16:33:01 2006 +From: Matthew Wilcox <matthew@wil.cx> +Message-Id: <200606300931.k5U9VOdN001627@shell0.pdx.osdl.net> +Subject: Resources: insert identical resources above existing resources +To: greg@kroah.com +Cc: akpm@osdl.org, matthew@wil.cx, ink@jurassic.park.msu.ru, linux@dominikbrodowski.net +Date: Fri, 30 Jun 2006 02:31:24 -0700 + +From: Matthew Wilcox <matthew@wil.cx> + +If you have two resources which aree exactly the same size, +insert_resource() currently inserts the new one below the existing one. +This is wrong because there's no way to insert a resource of the same size +above an existing one. + +I took this opportunity to rewrite the initial loop to be a for-loop +instead of a goto-loop and fix the documentation. + +Signed-off-by: Matthew Wilcox <matthew@wil.cx> +Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> +Cc: Dominik Brodowski <linux@dominikbrodowski.net> +Signed-off-by: Andrew Morton <akpm@osdl.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + kernel/resource.c | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +--- gregkh-2.6.orig/kernel/resource.c ++++ gregkh-2.6/kernel/resource.c +@@ -342,12 +342,11 @@ EXPORT_SYMBOL(allocate_resource); + * + * Returns 0 on success, -EBUSY if the resource can't be inserted. + * +- * This function is equivalent of request_resource when no conflict ++ * This function is equivalent to request_resource when no conflict + * happens. If a conflict happens, and the conflicting resources + * entirely fit within the range of the new resource, then the new +- * resource is inserted and the conflicting resources become childs of +- * the new resource. Otherwise the new resource becomes the child of +- * the conflicting resource ++ * resource is inserted and the conflicting resources become children of ++ * the new resource. + */ + int insert_resource(struct resource *parent, struct resource *new) + { +@@ -355,20 +354,21 @@ int insert_resource(struct resource *par + struct resource *first, *next; + + write_lock(&resource_lock); +- begin: +- result = 0; +- first = __request_resource(parent, new); +- if (!first) +- goto out; + +- result = -EBUSY; +- if (first == parent) +- goto out; ++ for (;; parent = first) { ++ result = 0; ++ first = __request_resource(parent, new); ++ if (!first) ++ goto out; + +- /* Resource fully contained by the clashing resource? Recurse into it */ +- if (first->start <= new->start && first->end >= new->end) { +- parent = first; +- goto begin; ++ result = -EBUSY; ++ if (first == parent) ++ goto out; ++ ++ if ((first->start > new->start) || (first->end < new->end)) ++ break; ++ if ((first->start == new->start) && (first->end == new->end)) ++ break; + } + + for (next = first; ; next = next->sibling) { |