<div>Hi,</div>
<div>I have a board based on ocotea(ppc440gx) as reference.<br>Without PCI bus,the linux system can run successfully on<br>the board. when the PCI bus is used,the system hung.<br>on the pci bus ,there are two pci devices.one
 is a scsi <br>controller,the other is a fpga. i found the system hung at<br>indirect_pci.c.</div>
<p><br>&nbsp;indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int len, u32 *val)<br>{<br>&nbsp;struct pci_controller *hose = bus-&gt;sysdata;<br>&nbsp;volatile void __iomem *cfg_data;<br>&nbsp;u8 cfg_type = 0;
</p>
<p>&nbsp;if (ppc_md.pci_exclude_device)<br>&nbsp;&nbsp;if (ppc_md.pci_exclude_device(bus-&gt;number, devfn))<br>&nbsp;&nbsp;&nbsp;return PCIBIOS_DEVICE_NOT_FOUND;<br>&nbsp;<br>&nbsp;if (hose-&gt;set_cfg_type)<br>&nbsp;&nbsp;if (bus-&gt;number != hose-&gt;first_busno)<br>
&nbsp;&nbsp;&nbsp;cfg_type = 1;</p>
<p>&nbsp;PCI_CFG_OUT(hose-&gt;cfg_addr, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp; (0x80000000 | ((bus-&gt;number - hose-&gt;bus_offset) &lt;&lt; 16)<br>&nbsp;&nbsp;&nbsp; | (devfn &lt;&lt; 8) | ((offset &amp; 0xfc) | cfg_type)));</p>
<p>&nbsp;/*<br>&nbsp; * Note: the caller has already checked that offset is<br>&nbsp; * suitably aligned and that len is 1, 2 or 4.<br>&nbsp; */<br>&nbsp;cfg_data = hose-&gt;cfg_data + (offset &amp; 3);<br>&nbsp;switch (len) {<br>&nbsp;case 1:<br>&nbsp;&nbsp;*val = in_8(cfg_data);
<br>&nbsp;&nbsp;break;<br>&nbsp;case 2:<br>&nbsp;&nbsp;*val = in_le16(cfg_data);<br>&nbsp;&nbsp;break;<br>&nbsp;default:<br>&nbsp;&nbsp;*val = in_le32(cfg_data);<br>&nbsp;&nbsp;break;<br>&nbsp;}<br>&nbsp;return PCIBIOS_SUCCESSFUL;<br>}<br>&nbsp;the system run to *val = in_le32(cfg_data) , the board hung.
<br>&nbsp;when i get out scsi controller,the system can run successfully.</p>
<p>&nbsp;the vxworks run successfully on the board with these two pci devices.<br>&nbsp;so i think the board have no problem on the hardware.</p>
<p>&nbsp;my question is :<br>&nbsp;why can linux read fpga pci configure space and can&#39;t read scsi <br>&nbsp;controller(lsi 53c1020)?</p>
<p>&nbsp;any help will be appreciated!<br>&nbsp; <br>&nbsp;Regards,<br>&nbsp;--<br>&nbsp;&nbsp;Tom</p>