[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] pci: clean up of changeset 860



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1239878864 -3600
# Node ID dfd2adc5874021b52c13d317df1f55b46ec38e3d
# Parent  366c31f3ab4bbaaa9baafb0832d0d9278647267c
pci: clean up of changeset 860

The fixing logic was somewhat confused and doesn't produce right
result. This patch cleans it up.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 drivers/pci/setup-res.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff -r 366c31f3ab4b -r dfd2adc58740 drivers/pci/setup-res.c
--- a/drivers/pci/setup-res.c   Tue Apr 14 11:17:47 2009 +0100
+++ b/drivers/pci/setup-res.c   Thu Apr 16 11:47:44 2009 +0100
@@ -245,11 +245,6 @@ pdev_sort_resources(struct pci_dev *dev,
                if (!(r->flags) || r->parent)
                        continue;
                
-               if (i < PCI_BRIDGE_RESOURCES && (r->flags & IORESOURCE_MEM) &&
-                   !r_align && reassigndev)
-                       /* -1 is compensation for +1 in the following calc. */
-                       r_align = ALIGN(r_align, PAGE_SIZE) - 1;
-
                if (!r_align) {
                        printk(KERN_WARNING "PCI: Ignore bogus resource %d "
                                "[%llx:%llx] of %s\n",
@@ -258,6 +253,11 @@ pdev_sort_resources(struct pci_dev *dev,
                        continue;
                }
                r_align = (i < PCI_BRIDGE_RESOURCES) ? r_align + 1 : r->start;
+
+               if (i < PCI_BRIDGE_RESOURCES && (r->flags & IORESOURCE_MEM) &&
+                   reassigndev)
+                       r_align = ALIGN(r_align, PAGE_SIZE);
+
                for (list = head; ; list = list->next) {
                        resource_size_t align = 0;
                        struct resource_list *ln = list->next;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.