opnsense-src/sys/dev/pci
Andriy Gapon 12588ce02d PCI hot-plug: use dedicated taskqueue for device attach / detach
Attaching and detaching devices can be heavy-weight and detaching can
sleep waiting for events.  For that reason using the system-wide
single-threaded taskqueue_thread is not really appropriate.
There is even a possibility for a deadlock if taskqueue_thread is used
for detaching.

In fact, there is an easy to reproduce deadlock involving nvme, pass
and a sudden removal of an NVMe device.
A pass peripheral would not release a reference on an nvme sim until
pass_shutdown_kqueue() is executed via taskqueue_thread.  But the
taskqueue's thread is blocked in nvme_detach() -> ... -> cam_sim_free()
because of the outstanding reference.

MFC after:	10 days
Sponsored by:	CyberSecure
Reviewed by:	mav, imp
Differential Revision:	https://reviews.freebsd.org/D30144
2021-05-06 21:49:37 +03:00
..
controller Use pmap_qenter in the N1SDP PCIe driver 2021-02-25 12:38:05 +00:00
fixup_pci.c
hostb_pci.c
ignore_pci.c
isa_pci.c
pci.c Set PCIe device's Max_Payload_Size to match PCIe root's. 2021-04-05 10:34:40 -04:00
pci_dw.c pci_dw: Trim ATU windows bigger than 4GB 2021-04-09 09:37:59 +02:00
pci_dw.h
pci_dw_if.m
pci_dw_mv.c pci_dw_mv: Don't enable unhandled interrupts. 2021-03-01 14:03:34 +01:00
pci_host_generic.c
pci_host_generic.h
pci_host_generic_acpi.c
pci_host_generic_acpi.h
pci_host_generic_fdt.c
pci_host_generic_fdt.h
pci_if.m
pci_iov.c pci_iov: When pci_iov_detach(9) is called, destroy VF children 2020-12-18 03:46:50 +00:00
pci_iov.h
pci_iov_if.m
pci_iov_private.h
pci_iov_schema.c
pci_pci.c PCI hot-plug: use dedicated taskqueue for device attach / detach 2021-05-06 21:49:37 +03:00
pci_private.h
pci_subr.c
pci_user.c pci_user: fix build for 32-bit platforms 2021-04-06 18:50:36 +02:00
pcib_if.m
pcib_private.h
pcib_support.c
pcireg.h
pcivar.h Implement pci_get_relaxed_ordering_enabled() helper function. 2021-03-17 13:48:04 +01:00
schema_private.h
vga_pci.c