Problem with PCI bus rescan on 460EX
Felix Radensky
felix at embedded-sol.com
Sun Mar 28 20:13:38 EST 2010
Hello, Kenji-san
Kenji Kaneshige wrote:
> Felix Radensky wrote:
>> Hello, Kenji-san
>>
>> Kenji Kaneshige wrote:
>>>
>>> I misunderstood the problem.
>>> My understanding was memory resource was not enabled even though
>>> Linux set
>>> the Memory Space bit in the command register. But it was not
>>> correct. The
>>> bridge memory window was marked unused and Linux didn't try to set
>>> Memory
>>> Space bit in the command register. Current my understanding is as
>>> follows.
>>> Please correct me if I'm still misunderstanding something.
>>>
>>> 1) Your BIOS doesn't assign any resource to the bridge if its child PCI
>>> hot-plug slot is not occupied.
>>>
>>> 2) At the boot time, pci_assign_unassigned_resources() try to assign
>>> memory resouces to the bridge using pci_bus_assign_resource(), but
>>> it was disabled because there are no devices require memory resource.
>>>
>>> 3) And then pci_assign_unassigned_resouces() calls pci_enable_bridge(),
>>> but Memory Space bit in the command register was not set because no
>>> memory resource are assigned to the bridge. At the same time,
>>> pci_dev->enable_cnt was incremented.
>>>
>>> 4) At the rescan time, pci_setup_bridge() and pci_enable_bridge()
>>> doesn't
>>> work because the bridge is already marked "enabled" (i.e.
>>> pci_dev->enable_cnt is not zero).
>>>
>>> I don't have any concrete idea how to fix that so far, but I can say
>>> my idea
>>> (pcibios_enable_device() should return an error) was wrong.
>>>
>>>
>> I was wandering if setting is_hotplug_bridge property for this bridge
>> (e.g. via
>> header quirk) can be an acceptable solution. This will allow passing
>> hpmemsize
>> kernel parameter, to specify the amount of memory to assign to the
>> bridge.
>> I've tested this approach and it seems to work.
>
> Looks good to me.
>
> By the way, I think Yinghai's bridge resource reallocation patch series
> might help you. It is in Jesse's PCI tree. Please take a look.
>
> Thanks,
> Kenji Kaneshige
>
I've tried Jesse's tree with Yinghai's patches, but they don't seem to help.
Memory for bridge is not allocated after insertion of hotplug device and
bus rescan. Attached dmesg output in case of success and failure.
Thanks.
Felix.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: success.txt
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20100328/0072b79e/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: failure.txt
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20100328/0072b79e/attachment-0001.txt>
More information about the Linuxppc-dev
mailing list