Skip to content
  • Gavin Shan's avatar
    powerpc/powernv: Skip check on PE if necessary · db1266c8
    Gavin Shan authored
    
    
    While the device driver or PCI core tries to enable PCI device, the
    platform dependent callback "ppc_md.pcibios_enable_device_hook" will
    be called to check if there has one associated PE for the PCI device.
    If we don't have the associated PE for the PCI device, it's not allowed
    to enable the PCI device. Unfortunately, there might have some cases
    we have to enable the PCI device (e.g. P2P bridge), but the PEs have
    not been created yet.
    
    The patch handles the unfortunate cases. Each PHB (struct pnv_phb)
    has one field "initialized" to trace if the PEs have been created
    and configured or not. When the PEs are not available, we won't check
    the associated PE for the PCI device to be enabled.
    
    Signed-off-by: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
    Reviewed-by: default avatarRam Pai <linuxram@us.ibm.com>
    Reviewed-by: default avatarRichard Yang <weiyang@linux.vnet.ibm.com>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    db1266c8