diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-24 16:08:41 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-24 16:08:41 -0700 |
commit | 915521c1df29905839fc5e372fc898bb4104f907 (patch) | |
tree | 00456561327887dc80496bc0774c7081c332d053 /pci | |
parent | 4a076f7ffaae89e3f1c2ffecd147b79ae1e0bd9d (diff) | |
download | patches-915521c1df29905839fc5e372fc898bb4104f907.tar.gz |
more patches added (and 1 removed)
Diffstat (limited to 'pci')
-rw-r--r-- | pci/pci-hotplug-make-acpiphp_glue.c-handle_hotplug_event_func-static.patch | 60 | ||||
-rw-r--r-- | pci/pci-ignore-pre-set-64-bit-bars-on-32-bit-platforms.patch | 75 |
2 files changed, 75 insertions, 60 deletions
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 deleted file mode 100644 index 640986857a399..0000000000000 --- a/pci/pci-hotplug-make-acpiphp_glue.c-handle_hotplug_event_func-static.patch +++ /dev/null @@ -1,60 +0,0 @@ -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-ignore-pre-set-64-bit-bars-on-32-bit-platforms.patch b/pci/pci-ignore-pre-set-64-bit-bars-on-32-bit-platforms.patch new file mode 100644 index 0000000000000..4f963a165298a --- /dev/null +++ b/pci/pci-ignore-pre-set-64-bit-bars-on-32-bit-platforms.patch @@ -0,0 +1,75 @@ +From owner-linux-pci@atrey.karlin.mff.cuni.cz Tue Apr 18 17:20:07 2006 +Message-ID: <44458228.1010302@zytor.com> +Date: Tue, 18 Apr 2006 17:19:52 -0700 +From: "H. Peter Anvin" <hpa@zytor.com> +To: Greg KH <greg@kroah.com> +Subject: PCI: Ignore pre-set 64-bit BARs on 32-bit platforms + +From: H. Peter Anvin <hpa@c2micro.com> + +[pci] Ignore pre-set 64-bit BARs on 32-bit platforms + +Currently, Linux always rejects a device which has a pre-set 64-bit +address on a 32-bit platform. On systems which do not do PCI +initialization in firmware, this causes some devices which don't +correctly power up with all BARs zero to fail. + +This patch makes the kernel automatically zero out such an address +(thus treating it as if it had not been set at all, meaning it will +assign an address if necessary). + +I have done this only for devices, not bridges. It seems potentially +hazardous to do for bridges. + +Signed-off-by: H. Peter Anvin <hpa@c2micro.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pci/probe.c | 28 +++++++++++++++++----------- + 1 file changed, 17 insertions(+), 11 deletions(-) + +--- gregkh-2.6.orig/drivers/pci/probe.c ++++ gregkh-2.6/drivers/pci/probe.c +@@ -180,25 +180,31 @@ static void pci_read_bases(struct pci_de + res->flags |= pci_calc_resource_flags(l); + if ((l & (PCI_BASE_ADDRESS_SPACE | PCI_BASE_ADDRESS_MEM_TYPE_MASK)) + == (PCI_BASE_ADDRESS_SPACE_MEMORY | PCI_BASE_ADDRESS_MEM_TYPE_64)) { +- pci_read_config_dword(dev, reg+4, &l); ++ u32 szhi, lhi; ++ pci_read_config_dword(dev, reg+4, &lhi); ++ pci_write_config_dword(dev, reg+4, ~0); ++ pci_read_config_dword(dev, reg+4, &szhi); ++ pci_write_config_dword(dev, reg+4, lhi); ++ szhi = pci_size(lhi, szhi, 0xffffffff); + next++; + #if BITS_PER_LONG == 64 +- res->start |= ((unsigned long) l) << 32; ++ res->start |= ((unsigned long) lhi) << 32; + res->end = res->start + sz; +- pci_write_config_dword(dev, reg+4, ~0); +- pci_read_config_dword(dev, reg+4, &sz); +- pci_write_config_dword(dev, reg+4, l); +- sz = pci_size(l, sz, 0xffffffff); +- if (sz) { ++ if (szhi) { + /* This BAR needs > 4GB? Wow. */ +- res->end |= (unsigned long)sz<<32; ++ res->end |= (unsigned long)szhi<<32; + } + #else +- if (l) { +- printk(KERN_ERR "PCI: Unable to handle 64-bit address for device %s\n", pci_name(dev)); ++ if (szhi) { ++ printk(KERN_ERR "PCI: Unable to handle 64-bit BAR for device %s\n", pci_name(dev)); + res->start = 0; + res->flags = 0; +- continue; ++ } else if (l) { ++ /* 64-bit wide address, treat as disabled */ ++ pci_write_config_dword(dev, reg, l & ~(u32)PCI_BASE_ADDRESS_MEM_MASK); ++ pci_write_config_dword(dev, reg+4, 0); ++ res->start = 0; ++ res->end = sz; + } + #endif + } |