• B
    PCI: Don't enable decoding if BAR hasn't been assigned an address · 3cedcc36
    Bjorn Helgaas 提交于
    Don't enable memory or I/O decoding if we haven't assigned or claimed the
    BAR's resource.
    
    If we enable decoding for a BAR that hasn't been assigned an address, we'll
    likely cause bus conflicts.  This declines to enable decoding for resources
    with IORESOURCE_UNSET.
    
    Note that drivers can use pci_enable_device_io() or pci_enable_device_mem()
    if they only care about specific types of BARs.  In that case, we don't
    bother checking whether the corresponding resources are assigned or
    claimed.
    Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
    3cedcc36
setup-res.c 9.1 KB