Lines Matching +full:hot +full:- +full:plug
1 // SPDX-License-Identifier: GPL-2.0+
3 * PCI Express Hot Plug Controller Driver
6 * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com)
8 * Copyright (C) 2003-2004 Intel Corporation
25 * pciehp_configure_device() - enumerate PCI devices below a hotplug bridge
29 * Return 0 on success, %-EEXIST if the devices are already enumerated or
30 * %-ENODEV if enumeration failed.
35 struct pci_dev *bridge = ctrl->pcie->port; in pciehp_configure_device()
36 struct pci_bus *parent = bridge->subordinate; in pciehp_configure_device()
47 ctrl_dbg(ctrl, "Device %s already exists at %04x:%02x:00, skipping hot-add\n", in pciehp_configure_device()
48 pci_name(dev), pci_domain_nr(parent), parent->number); in pciehp_configure_device()
50 ret = -EEXIST; in pciehp_configure_device()
57 ret = -ENODEV; in pciehp_configure_device()
69 * to avoid AB-BA deadlock with device_lock. in pciehp_configure_device()
71 up_read(&ctrl->reset_lock); in pciehp_configure_device()
73 down_read_nested(&ctrl->reset_lock, ctrl->depth); in pciehp_configure_device()
76 ctrl->dsn = pci_get_dsn(dev); in pciehp_configure_device()
85 * pciehp_unconfigure_device() - remove PCI devices below a hotplug bridge
98 struct pci_bus *parent = ctrl->pcie->port->subordinate; in pciehp_unconfigure_device()
102 __func__, pci_domain_nr(parent), parent->number); in pciehp_unconfigure_device()
110 * Stopping an SR-IOV PF device removes all the associated VFs, in pciehp_unconfigure_device()
111 * which will update the bus->devices list and confuse the in pciehp_unconfigure_device()
115 list_for_each_entry_safe_reverse(dev, temp, &parent->devices, in pciehp_unconfigure_device()
121 * to avoid AB-BA deadlock with device_lock. in pciehp_unconfigure_device()
123 up_read(&ctrl->reset_lock); in pciehp_unconfigure_device()
125 down_read_nested(&ctrl->reset_lock, ctrl->depth); in pciehp_unconfigure_device()