Release 4.7 drivers/pci/remove.c
#include <linux/pci.h>
#include <linux/module.h>
#include <linux/pci-aspm.h>
#include "pci.h"
static void pci_free_resources(struct pci_dev *dev)
{
int i;
for (i = 0; i < PCI_NUM_RESOURCES; i++) {
struct resource *res = dev->resource + i;
if (res->parent)
release_resource(res);
}
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
rafael j. wysocki | rafael j. wysocki | 51 | 100.00% | 1 | 100.00% |
| Total | 51 | 100.00% | 1 | 100.00% |
static void pci_stop_dev(struct pci_dev *dev)
{
pci_pme_active(dev, false);
if (dev->is_added) {
pci_proc_detach_device(dev);
pci_remove_sysfs_dev_files(dev);
device_release_driver(&dev->dev);
dev->is_added = 0;
}
if (dev->bus->self)
pcie_aspm_exit_link_state(dev);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 28 | 44.44% | 2 | 25.00% |
li shaohua | li shaohua | 13 | 20.63% | 1 | 12.50% |
rafael j. wysocki | rafael j. wysocki | 8 | 12.70% | 2 | 25.00% |
rajesh shah | rajesh shah | 5 | 7.94% | 1 | 12.50% |
jon smirl | jon smirl | 5 | 7.94% | 1 | 12.50% |
satoru takeuchi | satoru takeuchi | 4 | 6.35% | 1 | 12.50% |
| Total | 63 | 100.00% | 8 | 100.00% |
static void pci_destroy_dev(struct pci_dev *dev)
{
if (!dev->dev.kobj.parent)
return;
device_del(&dev->dev);
down_write(&pci_bus_sem);
list_del(&dev->bus_list);
up_write(&pci_bus_sem);
pci_free_resources(dev);
put_device(&dev->dev);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
rafael j. wysocki | rafael j. wysocki | 45 | 70.31% | 3 | 50.00% |
satoru takeuchi | satoru takeuchi | 10 | 15.62% | 1 | 16.67% |
greg kroah-hartman | greg kroah-hartman | 5 | 7.81% | 1 | 16.67% |
jiang liu | jiang liu | 4 | 6.25% | 1 | 16.67% |
| Total | 64 | 100.00% | 6 | 100.00% |
void pci_remove_bus(struct pci_bus *bus)
{
pci_proc_detach_bus(bus);
down_write(&pci_bus_sem);
list_del(&bus->node);
pci_bus_release_busn_res(bus);
up_write(&pci_bus_sem);
pci_remove_legacy_files(bus);
if (bus->ops->remove_bus)
bus->ops->remove_bus(bus);
pcibios_remove_bus(bus);
device_unregister(&bus->dev);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 29 | 38.67% | 2 | 20.00% |
thierry reding | thierry reding | 17 | 22.67% | 1 | 10.00% |
john rose | john rose | 8 | 10.67% | 2 | 20.00% |
bjorn helgaas | bjorn helgaas | 6 | 8.00% | 1 | 10.00% |
jiang liu | jiang liu | 5 | 6.67% | 1 | 10.00% |
yanmin zhang | yanmin zhang | 4 | 5.33% | 1 | 10.00% |
yinghai lu | yinghai lu | 4 | 5.33% | 1 | 10.00% |
matthew dobson | matthew dobson | 2 | 2.67% | 1 | 10.00% |
| Total | 75 | 100.00% | 10 | 100.00% |
EXPORT_SYMBOL(pci_remove_bus);
static void pci_stop_bus_device(struct pci_dev *dev)
{
struct pci_bus *bus = dev->subordinate;
struct pci_dev *child, *tmp;
/*
* Stopping an SR-IOV PF device removes all the associated VFs,
* which will update the bus->devices list and confuse the
* iterator. Therefore, iterate in reverse so we remove the VFs
* first, then the PF.
*/
if (bus) {
list_for_each_entry_safe_reverse(child, tmp,
&bus->devices, bus_list)
pci_stop_bus_device(child);
}
pci_stop_dev(dev);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
bjorn helgaas | bjorn helgaas | 23 | 41.82% | 2 | 50.00% |
john rose | john rose | 17 | 30.91% | 1 | 25.00% |
yinghai lu | yinghai lu | 15 | 27.27% | 1 | 25.00% |
| Total | 55 | 100.00% | 4 | 100.00% |
static void pci_remove_bus_device(struct pci_dev *dev)
{
struct pci_bus *bus = dev->subordinate;
struct pci_dev *child, *tmp;
if (bus) {
list_for_each_entry_safe(child, tmp,
&bus->devices, bus_list)
pci_remove_bus_device(child);
pci_remove_bus(bus);
dev->subordinate = NULL;
}
pci_destroy_dev(dev);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
yinghai lu | yinghai lu | 49 | 75.38% | 2 | 40.00% |
greg kroah-hartman | greg kroah-hartman | 7 | 10.77% | 1 | 20.00% |
john rose | john rose | 6 | 9.23% | 1 | 20.00% |
bjorn helgaas | bjorn helgaas | 3 | 4.62% | 1 | 20.00% |
| Total | 65 | 100.00% | 5 | 100.00% |
/**
* pci_stop_and_remove_bus_device - remove a PCI device and any children
* @dev: the device to remove
*
* Remove a PCI device from the device lists, informing the drivers
* that the device has been removed. We also remove any subordinate
* buses and children in a depth-first manner.
*
* For each device we remove, delete the device structure from the
* device lists, remove the /proc entry, and notify userspace
* (/sbin/hotplug).
*/
void pci_stop_and_remove_bus_device(struct pci_dev *dev)
{
pci_stop_bus_device(dev);
pci_remove_bus_device(dev);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
yinghai lu | yinghai lu | 15 | 75.00% | 1 | 50.00% |
satoru takeuchi | satoru takeuchi | 5 | 25.00% | 1 | 50.00% |
| Total | 20 | 100.00% | 2 | 100.00% |
EXPORT_SYMBOL(pci_stop_and_remove_bus_device);
void pci_stop_and_remove_bus_device_locked(struct pci_dev *dev)
{
pci_lock_rescan_remove();
pci_stop_and_remove_bus_device(dev);
pci_unlock_rescan_remove();
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
rafael j. wysocki | rafael j. wysocki | 21 | 100.00% | 1 | 100.00% |
| Total | 21 | 100.00% | 1 | 100.00% |
EXPORT_SYMBOL_GPL(pci_stop_and_remove_bus_device_locked);
void pci_stop_root_bus(struct pci_bus *bus)
{
struct pci_dev *child, *tmp;
struct pci_host_bridge *host_bridge;
if (!pci_is_root_bus(bus))
return;
host_bridge = to_pci_host_bridge(bus->bridge);
list_for_each_entry_safe_reverse(child, tmp,
&bus->devices, bus_list)
pci_stop_bus_device(child);
/* stop the host bridge */
device_release_driver(&host_bridge->dev);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
yinghai lu | yinghai lu | 65 | 100.00% | 2 | 100.00% |
| Total | 65 | 100.00% | 2 | 100.00% |
EXPORT_SYMBOL_GPL(pci_stop_root_bus);
void pci_remove_root_bus(struct pci_bus *bus)
{
struct pci_dev *child, *tmp;
struct pci_host_bridge *host_bridge;
if (!pci_is_root_bus(bus))
return;
host_bridge = to_pci_host_bridge(bus->bridge);
list_for_each_entry_safe(child, tmp,
&bus->devices, bus_list)
pci_remove_bus_device(child);
pci_remove_bus(bus);
host_bridge->bus = NULL;
/* remove the host bridge */
device_unregister(&host_bridge->dev);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
yinghai lu | yinghai lu | 76 | 100.00% | 2 | 100.00% |
| Total | 76 | 100.00% | 2 | 100.00% |
EXPORT_SYMBOL_GPL(pci_remove_root_bus);
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
yinghai lu | yinghai lu | 226 | 38.11% | 6 | 20.69% |
rafael j. wysocki | rafael j. wysocki | 130 | 21.92% | 5 | 17.24% |
greg kroah-hartman | greg kroah-hartman | 82 | 13.83% | 3 | 10.34% |
john rose | john rose | 36 | 6.07% | 2 | 6.90% |
bjorn helgaas | bjorn helgaas | 32 | 5.40% | 3 | 10.34% |
satoru takeuchi | satoru takeuchi | 19 | 3.20% | 1 | 3.45% |
thierry reding | thierry reding | 17 | 2.87% | 1 | 3.45% |
li shaohua | li shaohua | 16 | 2.70% | 1 | 3.45% |
ray jui | ray jui | 10 | 1.69% | 1 | 3.45% |
jiang liu | jiang liu | 9 | 1.52% | 2 | 6.90% |
jon smirl | jon smirl | 5 | 0.84% | 1 | 3.45% |
rajesh shah | rajesh shah | 5 | 0.84% | 1 | 3.45% |
yanmin zhang | yanmin zhang | 4 | 0.67% | 1 | 3.45% |
matthew dobson | matthew dobson | 2 | 0.34% | 1 | 3.45% |
| Total | 593 | 100.00% | 29 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.