lkml.org 
[lkml]   [2008]   [Mar]   [26]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
Patch in this message
/
DateWed, 26 Mar 2008 13:30:12 -0700
FromGary Hade <>
SubjectRe: [patch] pci: revert "PCI: remove transparent bridge sizing"
On Wed, Mar 26, 2008 at 11:33:24AM -0700, Linus Torvalds wrote:
> 
> 
> On Wed, 26 Mar 2008, Gary Hade wrote:
> >
> > I have a fix for the ThinkPad docking Oops but if the issue being
> > discussed here is caused by the transparent bridge sizing removal
> > change I totally agree that it should be reverted.  
> 
> Ok, I reverted it, but the docking Oops is still interesting, in that it 
> implies that some piece of code wasn't exactly robust. I haven't seen the 
> patch, but it sounds like that should be fixed independently..

Could be but without the sizing removal I doubt that the fix I
was going to propose (see below) would be the same.  What I had
found is that the removal of the transparent bridge sizing was
leaving the resource record for at least region 7 (IO) of a
hot-added transparent bridge on the docking station in a state
that was not palatable with later executed code in pdev_sort_resource().
Even though the restoration of the transparent bridge sizing
corrects the problem, pdev_sort_resource() could probably use
some bulletproofing.  I will take a look at this.

Thanks,
Gary

-- 
Gary Hade
System x Enablement
IBM Linux Technology Center
503-578-4503  IBM T/L: 775-4503
garyhade@us.ibm.com
http://www.ibm.com/linux/ltc


--- linux-2.6.25-rc6/drivers/pci/probe.c.orig	2008-03-20 12:09:14.000000000 -0700
+++ linux-2.6.25-rc6/drivers/pci/probe.c	2008-03-20 12:11:29.000000000 -0700
@@ -328,6 +328,8 @@ void __devinit pci_read_bridge_bases(str
 		if (!res->end)
 			res->end = limit + 0xfff;
 	}
+	if (!res->start && dev->transparent)
+		res->flags = 0;
 
 	res = child->resource[1];
 	pci_read_config_word(dev, PCI_MEMORY_BASE, &mem_base_lo);
@@ -339,6 +341,8 @@ void __devinit pci_read_bridge_bases(str
 		res->start = base;
 		res->end = limit + 0xfffff;
 	}
+	if (!res->start && dev->transparent)
+		res->flags = 0;
 
 	res = child->resource[2];
 	pci_read_config_word(dev, PCI_PREF_MEMORY_BASE, &mem_base_lo);
@@ -373,6 +377,8 @@ void __devinit pci_read_bridge_bases(str
 		res->start = base;
 		res->end = limit + 0xfffff;
 	}
+	if (!res->start && dev->transparent)
+		res->flags = 0;
 }
 
 static struct pci_bus * pci_alloc_bus(void)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2008-03-26 20:33    [W:0.562 / U:0.440 seconds]
©2003-2008 Jasper Spaans