Re: PROBLEM: Devices behind PCI Express-to-PCI bridge not mapped

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

 



On Thu, Jun 09, 2005 at 02:36:39AM +0400, Ivan Kokshaysky wrote:
> On Wed, Jun 08, 2005 at 07:34:09PM +0200, Andreas Koch wrote:
> > However, after pci_assign_unassigned_resources() has been called, the
> > MEM and PREFETCH regions of the bridge 0000:00:1e.0 (bridge 1) _remain_
> > invalid at 0x00000000.
> 
> I believe it was _IO_ and PREFETCH (unused windows of that bridge).
> Indeed, IO at 0 is fatal...

I haven't tried the patch yet, but had time to check the debug output
again.  And for the bridge 0000:00:1e.0, it definitely lists all
_three_ characteristics (IO, MEM and PREFETCH) as zero.  I'll let you
know how the patch turns out.

Andreas

> 
> Here is additional patch which ensures unused windows of the transparent
> bridge are disabled. 
> 
> Ivan.
> 
> --- linux/drivers/pci/setup-bus.c~	Sun Jun  5 18:37:57 2005
> +++ linux/drivers/pci/setup-bus.c	Thu Jun  9 01:28:42 2005
> @@ -156,7 +156,7 @@ pci_setup_bridge(struct pci_bus *bus)
>  
>  	/* Set up the top and bottom of the PCI I/O segment for this bus. */
>  	pcibios_resource_to_bus(bridge, &region, &b_res[0]);
> -	if (b_res[0].flags & IORESOURCE_IO) {
> +	if ((b_res[0].flags & IORESOURCE_IO) && (region.end > region.start)) {
>  		pci_read_config_dword(bridge, PCI_IO_BASE, &l);
>  		l &= 0xffff0000;
>  		l |= (region.start >> 8) & 0x00f0;
> @@ -182,7 +182,7 @@ pci_setup_bridge(struct pci_bus *bus)
>  	/* Set up the top and bottom of the PCI Memory segment
>  	   for this bus. */
>  	pcibios_resource_to_bus(bridge, &region, &b_res[1]);
> -	if (b_res[1].flags & IORESOURCE_MEM) {
> +	if ((b_res[1].flags & IORESOURCE_MEM) && (region.end > region.start)) {
>  		l = (region.start >> 16) & 0xfff0;
>  		l |= region.end & 0xfff00000;
>  		DBG(KERN_INFO "  MEM window: %08lx-%08lx\n",
> @@ -201,7 +201,8 @@ pci_setup_bridge(struct pci_bus *bus)
>  
>  	/* Set up PREF base/limit. */
>  	pcibios_resource_to_bus(bridge, &region, &b_res[2]);
> -	if (b_res[2].flags & IORESOURCE_PREFETCH) {
> +	if ((b_res[2].flags & IORESOURCE_PREFETCH) &&
> +	    (region.end > region.start)) {
>  		l = (region.start >> 16) & 0xfff0;
>  		l |= region.end & 0xfff00000;
>  		DBG(KERN_INFO "  PREFETCH window: %08lx-%08lx\n",

-- 
Prof. Dr. Andreas Koch                     [email protected]
Technische Universitaet Darmstadt, FB20           Phone  : x49-6151-16-4378
FG Embedded Systems and their Applications (ESA)  FAX    : x49-6151-16-5472
Hochschulstr. 10, D-64289 Darmstadt, Germany             * PGP key available *
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux