Re: Problem with PCI bus rescan on 460EX

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

 



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.

BTW, on my PCI hotplug capable system (SHPC and PCIe), I/O and Memory windows
of the bridge are assigned by BIOS regardless of whether hotplug slot(s)
behind the bridge is occupied or not. Maybe that is the reason why I have
never encountered this problem before.

Thanks,
Kenji Kaneshige


Yes, your understanding of the problem is correct. On this platform BIOS (bootloader, u-boot) is not required to configure PCI, linux is capable of doing all configuration itself. But both u-boot and linux do not assign memory resources to bridge if there's no device behind it.

Thanks a lot.

Felix.
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux