On Tue, Jul 23, 2013 at 7:01 PM, Yijing Wang <wangyijing@xxxxxxxxxx> wrote: > Hi Yinghai, > It seems to have the the same problem in acpiphp, > > diable_device(..): > > while ((pdev = dev_in_slot(slot))) { > pci_stop_and_remove_bus_device(pdev); > pci_dev_put(pdev); > } > > > static struct pci_dev *dev_in_slot(struct acpiphp_slot *slot) > { > struct pci_bus *bus = slot->bridge->pci_bus; > struct pci_dev *dev; > struct pci_dev *ret = NULL; > > down_read(&pci_bus_sem); > list_for_each_entry(dev, &bus->devices, bus_list) > if (PCI_SLOT(dev->devfn) == slot->device) { > ret = pci_dev_get(dev); > break; > } > up_read(&pci_bus_sem); > acpiphp is ok. dev_in_slot will restart from bus->devices again every time. Thanks Yinghai -- 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