opnsense-src/sys/dev
Warner Losh 1109ce0da2 nvme: fix a race between failing the controller and failing requests
Part of the nvme recovery process for errors is to reset the
card. Sometimes, this results in failing the entire controller. When nda
is in use, we free the sim, which will sleep until all the I/O has
completed. However, with only one thread, the request fail task never
runs once the reset thread sleeps here. Create two threads to allow I/O
to fail until it's all processed and the reset task can proceed.

This is a temporary kludge until I can work out questions that arose
during the review, not least is what was the race that queueing to a
failure task solved. The original commit is vague and other error paths
in the same context do a direct failure. I'll investigate that more
completely before committing changing that to a direct failure. mav@
raised this issue during the review, but didn't otherwise object.

Multiple threads, though, solve the problem in the mean time until other
such means can be perfected.

Reviewed by:		jhb@
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D30366

(cherry picked from commit f0f4712165)
2021-07-12 13:30:55 -06:00
..
aac
aacraid
acpi_support
acpica acpi: Add missing error handling to acpi_pci_link_route_irqs() 2021-06-02 09:32:37 -04:00
adb
adlink
ae
age
agp
ahci Add IDs for ASMedia ASM116x PCIe 3.0 AHCI controllers. 2021-04-13 21:02:58 -04:00
aic7xxx aic7xxx: Fix re-building firmware with -fno-common 2021-06-04 01:28:15 +01:00
al_eth al_eth: Use device_t in preference to struct device * 2021-04-19 09:02:01 -04:00
alc alc(4): add support for Mikrotik 10/25G NIC 2021-05-26 14:30:36 +03:00
ale
alpm
altera
amd_ecc_inject
amdgpio
amdpm
amdsbwd
amdsmb
amdsmn
amdtemp
amr
an
arcmsr arcmsr(4): Fix SCSI command timeout on ARC-1886. 2021-05-04 22:03:22 -07:00
asmc
ata
ath
atkbdc
axgbe
backlight
bce
beri
bfe
bge
bhnd
bnxt
bwi
bwn
bxe
cadence
cardbus
cas
ce
cesa
cfe
cfi
chromebook_platform
ciss
coretemp
cp
cpuctl
cpufreq
cxgb cxgb: Avoid a read-after-free in get_packet() when cxgb_debug is on 2021-06-02 09:34:07 -04:00
cxgbe cxgbe(4): Use ifaddr_event_ext instead of ifaddr_event for CLIP management. 2021-05-15 20:45:59 -07:00
cyapa
dc
dcons
dme
dpaa
dpms
drm2
dwc
dwwdt
e1000 e1000: Rework em_msi_link interrupt filter 2021-05-27 22:50:07 -07:00
efidev
ena
esp
et
etherswitch
evdev
exca
extres
fb
fdc
fdt
ffec
filemon
firewire fwohci: Cast bitfield to uint32_t before passing it to roundup2(). 2021-07-05 10:46:11 +01:00
flash
ftwd
fxp
gem
glxiic
glxsb
goldfish
gpio gpioc_detach: fix freeing of wrong pointers 2021-05-03 23:11:12 +03:00
gxemul
hdmi
hid usbhid(4): Add second set of USB transfers to work in polled mode. 2021-06-14 00:57:37 +03:00
hifn
hpt27xx
hptiop
hptmv
hptnr
hptrr
hwpmc
hyperv hyperv: Fix vmbus after the i386 4/4 split 2021-06-21 21:09:17 -04:00
ic
ice
ichiic ig4: Add PCI IDs for Intel Gemini Lake I2C controller. 2021-04-12 00:48:08 +03:00
ichsmb ichsmb: Add PCI ID for Intel Gemini Lake SMBus controller 2021-04-30 23:12:28 +03:00
ichwd
ida
if_ndis
iicbus usbhid(4): Add second set of USB transfers to work in polled mode. 2021-06-14 00:57:37 +03:00
iir
imcsmb
intel pchtherm: Add IDs for CannonLake-H, CometLake and Lewisburg controllers 2021-04-30 23:12:20 +03:00
intpm
io
ioat
iommu
ipmi
ips
ipw
isci
iscsi Consistently use the SOCKBUF_MTX() and SOCK_MTX() macros 2021-06-21 09:14:48 -04:00
iscsi_initiator
iser
isl
ismt
isp
ispfw
itwd
iwi
iwm
iwn iwn: adjust EEPROM read timeout for Intel 4965AGN M2 2021-06-14 16:25:14 -04:00
ixgbe ixgbe: Improve device name strings 2021-05-27 22:53:23 -07:00
ixl
jedec_dimm
jme
kbd Suppress D_NEEDGIANT warnings for some drivers 2021-06-14 16:25:14 -04:00
kbdmux
ksyms
le
led
lge
liquidio
malo
mbox
md sys/dev/md: Drop unncessary __GLOBL(mfs_root) 2021-04-10 14:01:05 +01:00
mdio
mem
mfi
mgb
mge
mii
mlx
mlx4
mlx5
mlxfw
mly
mmc
mmcnull
mn
mpr mpr/mps(4): Make device mapping some more robust. 2021-05-24 10:43:39 -04:00
mps mpr/mps(4): Make device mapping some more robust. 2021-05-24 10:43:39 -04:00
mpt mpt(4): Remove incorrect S/G segments limits. 2021-04-23 20:43:14 -04:00
mrsas
msk
mthca
mvs
mwl
mxge
my
nctgpio
neta
netfpga10g/nf10bmac
netmap netmap: don't use linux type struct device * 2021-04-19 14:17:08 -04:00
nfe
nfsmb
nge
nmdm
ntb
null
nvd
nvdimm
nvme nvme: fix a race between failing the controller and failing requests 2021-07-12 13:30:55 -06:00
nvram
nvram2env
oce oce: Fix handling of m_pullup() errors in oce_tso_setup() 2021-06-02 09:33:16 -04:00
ocs_fc
ofw Suppress D_NEEDGIANT warnings for some drivers 2021-06-14 16:25:14 -04:00
otus
ow
pbio
pccard
pccbb
pcf
pci PCI hot-plug: use dedicated taskqueue for device attach / detach 2021-05-21 13:28:06 +03:00
pms pms(4): Limit maximum I/O size to 256KB instead of 1MB. 2021-04-22 21:05:42 -04:00
powermac_nvram
ppbus
ppc
proto
psci
pst
pty
puc
pwm
qat qat: Make prototypes consistent with the implementation 2021-04-12 08:22:42 -04:00
qlnx qlnxr: Properly initialize the Linux device structure 2021-04-19 09:02:06 -04:00
qlxgb
qlxgbe
qlxge
quicc
ral
random
rccgpio
re
rl
rndtest
rt
rtsx
rtwn rtwn_usb(4): Add a USB ID for the TP-Link Archer T2U v3. 2021-06-10 09:14:22 +03:00
safe
safexcel
sbni
scc
sdhci
sdio
sec
sfxge
sge
siis
sis
sk
smartpqi smartpqi: clear CCBs allocated on the stack 2021-06-03 07:53:12 -06:00
smbus
smc
snp
sound hda: correct comment about Asus laptop digital mics 2021-05-26 20:47:14 -04:00
speaker
spibus
ste
stge
sume
superio
sym
syscons
tcp_log
tdfx
terasic
ti
tpm
tsec
twa
twe
tws
uart Add support for Gemini Lake LPSS UARTs. 2021-05-30 03:44:45 +03:00
usb Narrow down the probe range for if_ure(4) compatible devices 2021-07-10 21:17:29 +02:00
veriexec
vge
viapm
viawd
videomode
virtio if_vtnet: Fix pointer-sign and used parameter warnings 2021-07-05 10:46:11 +01:00
vkbd
vmd
vmgenc
vmware
vnic
vr
vt
vte
watchdog
wbwd
wpi
wtap
xdma
xen
xilinx
xl
xz
zlib