freebsd-dev/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 pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
ignore_pci.c
isa_pci.c pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
pci_dw_if.m Add driver for DesignWare PCIE core, and its Armada 8K specific attachement. 2019-10-20 11:11:32 +00:00
pci_dw_mv.c pci_dw_mv: Don't enable unhandled interrupts. 2021-03-01 14:03:34 +01:00
pci_dw.c pci_dw: Trim ATU windows bigger than 4GB 2021-04-09 09:37:59 +02:00
pci_dw.h pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
pci_host_generic_acpi.c Only set the PCI bus end when we are reducing it 2020-11-29 16:22:33 +00:00
pci_host_generic_acpi.h Add PCI Express driver for the ARM Neoverse N1 System Development 2020-02-11 15:12:09 +00:00
pci_host_generic_fdt.c pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
pci_host_generic_fdt.h Add a driver for bcm2838 PCI express controller 2020-07-06 08:51:55 +00:00
pci_host_generic.c pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
pci_host_generic.h Clean up the pci host generic driver 2020-06-17 19:56:17 +00:00
pci_if.m
pci_iov_if.m
pci_iov_private.h pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
pci_iov_schema.c
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_pci.c PCI hot-plug: use dedicated taskqueue for device attach / detach 2021-05-06 21:49:37 +03:00
pci_private.h Export pci_attach() and pci_detach(). 2019-10-15 18:58:01 +00:00
pci_subr.c
pci_user.c pci_user: fix build for 32-bit platforms 2021-04-06 18:50:36 +02:00
pci.c Set PCIe device's Max_Payload_Size to match PCIe root's. 2021-04-05 10:34:40 -04:00
pcib_if.m
pcib_private.h Abstract the locking for PCIe hotplug. It still uses Giant so there's 2019-12-26 21:00:06 +00:00
pcib_support.c pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
pcireg.h Add more values for PCI capabilities, PCIe extended capabilities, and subclasses. 2020-02-20 17:08:52 +00:00
pcivar.h Implement pci_get_relaxed_ordering_enabled() helper function. 2021-03-17 13:48:04 +01:00
schema_private.h
vga_pci.c pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00