From: Hideo S. <sa...@de...> - 2007-03-12 02:07:34
|
Hi Paul, When a SH7751R system includes a card that has wide range space like as graphics card, pci-pci bridge controller can't set correct address range used by the bridge to interconnect PCI buses. For example, when |*lower_limit| is 0xfd000000 and |bar_size| is 0x4000000, in the following program at arch/sh/drivers/pci/pci-auto.c, 0x0 is set in |bar_value|. pciauto_setup_bars() { ... bar_value = ((*lower_limit - 1) & ~(bar_size - 1)) + bar_size; ... *lower_limit = bar_value + bar_size; } As a result, 0x4000000 is set in |*lower_limit|, but this value is wrong. I think that the following patch can avoid this problem by checking a range of the value. --- arch/sh/drivers/pci/pci-auto.c.org Mon Feb 5 03:44:54 2007 +++ arch/sh/drivers/pci/pci-auto.c Mon Mar 12 11:04:21 2007 @@ -209,16 +209,22 @@ retry: goto retry; } } DBG(" unavailable -- skipping, value %x size %x\n", bar_value, bar_size); continue; } + if (bar_value < *lower_limit || (bar_value + bar_size) >= *upper_limit) { + DBG(" unavailable -- skipping, value %x size %x\n", + bar_value, bar_size); + continue; + } + #ifdef CONFIG_PCI_AUTO_UPDATE_RESOURCES /* Write it out and update our limit */ early_write_config_dword(hose, top_bus, current_bus, pci_devfn, bar, bar_value); #endif *lower_limit = bar_value + bar_size; |