acpiphp_sanitize_bus() in acpiphp module is safe and necessary ?

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

 



hi ,
    I was confused with acpiphp_sanitize_bus() function in acpiphp module, first i think list_for_each_entry operation is not safe because pci_remove_bus_device(dev) delete device out of the device list;second,when i hot-add PLX8696(have one upstream port and several downstream ports, and the downstream ports support hotplug pcie devices), acpiphp_sanitize_bus can only check the pci devices under the first bus(the bus between hp-port in system and upstream-port), because the function is not recursive.Can anyone help me? thank you very much!  

static void acpiphp_sanitize_bus(struct pci_bus *bus)
{
    struct pci_dev *dev;
    int i;
    unsigned long type_mask = IORESOURCE_IO | IORESOURCE_MEM;

    list_for_each_entry(dev, &bus->devices, bus_list) {
        for (i=0; i<PCI_BRIDGE_RESOURCES; i++) {
            struct resource *res = &dev->resource[i];
            if ((res->flags & type_mask) && !res->start &&
                    res->end) {
                /* Could not assign a required resources
                 * for this device, remove it */
                pci_remove_bus_device(dev);
                break;
            }
        }
    }
}

--
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