diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-25 14:44:34 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-25 14:44:34 -0700 |
commit | efe9e8261c1359bdb9ae90661eff88c8e740d3f9 (patch) | |
tree | f7881a02f588c2ecc05c0b4fb14eab6eb6eb368a /pci | |
parent | 706ddc032f54f763a03510d41c9bfcaa494560c7 (diff) | |
download | patches-efe9e8261c1359bdb9ae90661eff88c8e740d3f9.tar.gz |
more patches added
Diffstat (limited to 'pci')
4 files changed, 256 insertions, 0 deletions
diff --git a/pci/pci-64-bit-resource-fix-amba-build-warning.patch b/pci/pci-64-bit-resource-fix-amba-build-warning.patch new file mode 100644 index 0000000000000..80a2729ab3f1f --- /dev/null +++ b/pci/pci-64-bit-resource-fix-amba-build-warning.patch @@ -0,0 +1,32 @@ +From akpm@osdl.org Tue Apr 18 21:07:33 2006 +Message-Id: <200604190407.k3J47TZa008130@shell0.pdx.osdl.net> +Subject: PCI: 64 bit resource: fix amba build warning +To: greg@kroah.com +Cc: akpm@osdl.org +From: akpm@osdl.org +Date: Tue, 18 Apr 2006 21:06:47 -0700 + + +From: Andrew Morton <akpm@osdl.org> + +drivers/amba/bus.c: In function `show_resource': +drivers/amba/bus.c:183: warning: long long unsigned int format, different type arg (arg 5) + +Signed-off-by: Andrew Morton <akpm@osdl.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/amba/bus.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- gregkh-2.6.orig/drivers/amba/bus.c ++++ gregkh-2.6/drivers/amba/bus.c +@@ -180,7 +180,7 @@ static DEVICE_ATTR(name, S_IRUGO, show_# + amba_attr(id, "%08x\n", dev->periphid); + amba_attr(irq0, "%u\n", dev->irq[0]); + amba_attr(irq1, "%u\n", dev->irq[1]); +-amba_attr(resource, "\t%016llx\t%016llx\t%016llx\n", ++amba_attr(resource, "\t%016llx\t%016llx\t%016lx\n", + (unsigned long long)dev->res.start, (unsigned long long)dev->res.end, + dev->res.flags); + diff --git a/pci/pci-64-bit-resource-fixup-pci-resource-dbg-code-to-handle-size-change.patch b/pci/pci-64-bit-resource-fixup-pci-resource-dbg-code-to-handle-size-change.patch new file mode 100644 index 0000000000000..9a3f7a2631d49 --- /dev/null +++ b/pci/pci-64-bit-resource-fixup-pci-resource-dbg-code-to-handle-size-change.patch @@ -0,0 +1,148 @@ +From akpm@osdl.org Tue Apr 18 21:07:42 2006 +Message-Id: <200604190407.k3J47VX3008139@shell0.pdx.osdl.net> +Subject: PCI: 64 bit resource: fixup pci resource DBG code to handle size change +To: greg@kroah.com +Cc: akpm@osdl.org, galak@kernel.crashing.org +From: akpm@osdl.org +Date: Tue, 18 Apr 2006 21:06:50 -0700 + + +From: Kumar Gala <galak@kernel.crashing.org> + +A number of DBG() calls needed to be fixed up to properly handle the size +change in struct resource + +Signed-off-by: Kumar Gala <galak@kernel.crashing.org> +Signed-off-by: Andrew Morton <akpm@osdl.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + +--- + arch/powerpc/kernel/pci_32.c | 28 ++++++++++++++-------------- + arch/ppc/kernel/pci.c | 2 +- + 2 files changed, 15 insertions(+), 15 deletions(-) + +--- gregkh-2.6.orig/arch/powerpc/kernel/pci_32.c ++++ gregkh-2.6/arch/powerpc/kernel/pci_32.c +@@ -99,7 +99,7 @@ pcibios_fixup_resources(struct pci_dev * + if (!res->flags) + continue; + if (res->end == 0xffffffff) { +- DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n", ++ DBG("PCI:%s Resource %d [%016llx-%016llx] is unassigned\n", + pci_name(dev), i, res->start, res->end); + res->end -= res->start; + res->start = 0; +@@ -117,7 +117,7 @@ pcibios_fixup_resources(struct pci_dev * + res->start += offset; + res->end += offset; + #ifdef DEBUG +- printk("Fixup res %d (%lx) of dev %s: %lx -> %lx\n", ++ printk("Fixup res %d (%lx) of dev %s: %llx -> %llx\n", + i, res->flags, pci_name(dev), + res->start - offset, res->start); + #endif +@@ -179,7 +179,7 @@ void pcibios_align_resource(void *data, + struct pci_dev *dev = data; + + if (res->flags & IORESOURCE_IO) { +- unsigned long start = res->start; ++ u64 start = res->start; + + if (size > 0x100) { + printk(KERN_ERR "PCI: I/O Region %s/%d too large" +@@ -255,8 +255,8 @@ pcibios_allocate_bus_resources(struct li + } + } + +- DBG("PCI: bridge rsrc %lx..%lx (%lx), parent %p\n", +- res->start, res->end, res->flags, pr); ++ DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n", ++ res->start, res->end, res->flags, pr); + if (pr) { + if (request_resource(pr, res) == 0) + continue; +@@ -306,7 +306,7 @@ reparent_resources(struct resource *pare + *pp = NULL; + for (p = res->child; p != NULL; p = p->sibling) { + p->parent = res; +- DBG(KERN_INFO "PCI: reparented %s [%lx..%lx] under %s\n", ++ DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n", + p->name, p->start, p->end, res->name); + } + return 0; +@@ -362,7 +362,7 @@ pci_relocate_bridge_resource(struct pci_ + try = conflict->start - 1; + } + if (request_resource(pr, res)) { +- DBG(KERN_ERR "PCI: huh? couldn't move to %lx..%lx\n", ++ DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n", + res->start, res->end); + return -1; /* "can't happen" */ + } +@@ -480,14 +480,14 @@ static inline void alloc_resource(struct + { + struct resource *pr, *r = &dev->resource[idx]; + +- DBG("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n", ++ DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n", + pci_name(dev), idx, r->start, r->end, r->flags); + pr = pci_find_parent_resource(dev, r); + if (!pr || request_resource(pr, r) < 0) { + printk(KERN_ERR "PCI: Cannot allocate resource region %d" + " of device %s\n", idx, pci_name(dev)); + if (pr) +- DBG("PCI: parent is %p: %08lx-%08lx (f=%lx)\n", ++ DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n", + pr, pr->start, pr->end, pr->flags); + /* We'll assign a new address later */ + r->flags |= IORESOURCE_UNSET; +@@ -957,7 +957,7 @@ pci_process_bridge_OF_ranges(struct pci_ + res = &hose->io_resource; + res->flags = IORESOURCE_IO; + res->start = ranges[2]; +- DBG("PCI: IO 0x%lx -> 0x%lx\n", ++ DBG("PCI: IO 0x%llx -> 0x%llx\n", + res->start, res->start + size - 1); + break; + case 2: /* memory space */ +@@ -979,7 +979,7 @@ pci_process_bridge_OF_ranges(struct pci_ + if(ranges[0] & 0x40000000) + res->flags |= IORESOURCE_PREFETCH; + res->start = ranges[na+2]; +- DBG("PCI: MEM[%d] 0x%lx -> 0x%lx\n", memno, ++ DBG("PCI: MEM[%d] 0x%llx -> 0x%llx\n", memno, + res->start, res->start + size - 1); + } + break; +@@ -1075,7 +1075,7 @@ do_update_p2p_io_resource(struct pci_bus + DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge)); + res.start -= ((unsigned long) hose->io_base_virt - isa_io_base); + res.end -= ((unsigned long) hose->io_base_virt - isa_io_base); +- DBG(" IO window: %08lx-%08lx\n", res.start, res.end); ++ DBG(" IO window: %016llx-%016llx\n", res.start, res.end); + + /* Set up the top and bottom of the PCI I/O segment for this bus. */ + pci_read_config_dword(bridge, PCI_IO_BASE, &l); +@@ -1223,8 +1223,8 @@ do_fixup_p2p_level(struct pci_bus *bus) + continue; + if ((r->flags & IORESOURCE_IO) == 0) + continue; +- DBG("Trying to allocate from %08lx, size %08lx from parent" +- " res %d: %08lx -> %08lx\n", ++ DBG("Trying to allocate from %016llx, size %016llx from parent" ++ " res %d: %016llx -> %016llx\n", + res->start, res->end, i, r->start, r->end); + + if (allocate_resource(r, res, res->end + 1, res->start, max, +--- gregkh-2.6.orig/arch/ppc/kernel/pci.c ++++ gregkh-2.6/arch/ppc/kernel/pci.c +@@ -960,7 +960,7 @@ static pgprot_t __pci_mmap_set_pgprot(st + else + prot |= _PAGE_GUARDED; + +- printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start, ++ printk("PCI map for %s:%llx, prot: %llx\n", pci_name(dev), rp->start, + prot); + + return __pgprot(prot); diff --git a/pci/pci-improve-pci-config-space-writeback.patch b/pci/pci-improve-pci-config-space-writeback.patch new file mode 100644 index 0000000000000..14389d648326c --- /dev/null +++ b/pci/pci-improve-pci-config-space-writeback.patch @@ -0,0 +1,47 @@ +From akpm@osdl.org Tue Apr 18 21:07:42 2006 +Message-Id: <200604190407.k3J47WQt008150@shell0.pdx.osdl.net> +Subject: PCI: Improve PCI config space writeback +To: greg@kroah.com +Cc: akpm@osdl.org, davej@redhat.com +From: akpm@osdl.org +Date: Tue, 18 Apr 2006 21:06:51 -0700 + + +From: Dave Jones <davej@redhat.com> + +At least one laptop blew up on resume from suspend with a black screen due +to a lack of this patch. By only writing back config space that is +different, we minimise the possibility of accidents like this. + +Signed-off-by: Dave Jones <davej@redhat.com> +Signed-off-by: Andrew Morton <akpm@osdl.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pci/pci.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/pci/pci.c ++++ gregkh-2.6/drivers/pci/pci.c +@@ -461,9 +461,19 @@ int + pci_restore_state(struct pci_dev *dev) + { + int i; ++ int val; + +- for (i = 0; i < 16; i++) +- pci_write_config_dword(dev,i * 4, dev->saved_config_space[i]); ++ for (i = 0; i < 16; i++) { ++ pci_read_config_dword(dev, i * 4, &val); ++ if (val != dev->saved_config_space[i]) { ++ printk(KERN_DEBUG "PM: Writing back config space on " ++ "device %s at offset %x (was %x, writing %x)\n", ++ pci_name(dev), i, ++ val, (int)dev->saved_config_space[i]); ++ pci_write_config_dword(dev,i * 4, ++ dev->saved_config_space[i]); ++ } ++ } + pci_restore_msi_state(dev); + pci_restore_msix_state(dev); + return 0; diff --git a/pci/pciehp-dont-call-pci_enable_dev.patch b/pci/pciehp-dont-call-pci_enable_dev.patch new file mode 100644 index 0000000000000..51192bf8553c2 --- /dev/null +++ b/pci/pciehp-dont-call-pci_enable_dev.patch @@ -0,0 +1,29 @@ +From pcihpd-discuss-admin@lists.sourceforge.net Mon Apr 24 15:42:17 2006 +From: Kristen Accardi <kristen.c.accardi@intel.com> +Cc: greg@kroah.com +Message-Id: <1145919059.6478.29.camel@whizzy> +Subject: pciehp: dont call pci_enable_dev +Date: Mon, 24 Apr 2006 15:50:59 -0700 + +Don't call pci_enable_device from pciehp because the pcie port service driver +already does this. + +Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pci/hotplug/pciehp_hpc.c | 3 --- + 1 file changed, 3 deletions(-) + +--- gregkh-2.6.orig/drivers/pci/hotplug/pciehp_hpc.c ++++ gregkh-2.6/drivers/pci/hotplug/pciehp_hpc.c +@@ -1405,9 +1405,6 @@ int pcie_init(struct controller * ctrl, + info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", pdev->vendor, pdev->device, + pdev->subsystem_vendor, pdev->subsystem_device); + +- if (pci_enable_device(pdev)) +- goto abort_free_ctlr; +- + mutex_init(&ctrl->crit_sect); + /* setup wait queue */ + init_waitqueue_head(&ctrl->queue); |