diff options
| author | Koichiro Den <den@valinux.co.jp> | 2026-09-01 15:32:38 +0900 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-09-11 16:37:35 -0500 |
| commit | 5cdbd6d3a3a147fa9975e35f2602cbec9a72a932 (patch) | |
| tree | 8da5ad14e34371398afe54a422c69234658d7c5f /tools/perf/scripts/python/stackcollapse.py | |
| parent | 84c3520c9e8c14b09a5cf645cc4fa7c6d9d61127 (diff) | |
PCI: endpoint: pci-epf-vntb: Manage virtual NTB and PCI bus lifetime
The virtual PCI driver registers an ntb_dev but has no remove callback.
Unbinding the endpoint function can therefore free BARs while the NTB
device and its client still use them. It also leaves the virtual PCI
devices and root bus allocated.
Allocate an ntb_dev for each virtual PCI probe and unregister it from the
matching remove callback. Start command processing only after registration.
Publish the device for doorbell IRQs at the same point. During remove, stop
the command work and drain IRQ handlers before unregistering the device.
Retain the root bus returned by pci_scan_bus() so it can be removed on
unbind. Unregister the virtual PCI driver before releasing endpoint
resources. Stop and remove the root bus under the PCI rescan/remove lock,
then release its host bridge.
Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP")
Signed-off-by: Koichiro Den <den@valinux.co.jp>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Cc: stable@vger.kernel.org # 6.0+
Link: https://patch.msgid.link/20260901063238.631166-3-den@valinux.co.jp
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
