freebsd-skq/sys
imp 1e2464d905 Before issing the REMOVE_DEVICE command to the firmware, make sure that all
commands have completed.

It's not OK to force complete any pending commands before we send the
REMOVE_DEVICE. Instead, make sure that all pending commands are complete before
sending that. By trying to second guess the firmware here, we run the risk of
completing commands twice, which leads to corruption.

This removes the forced completion of commands introduced in r218811. So it's a
partial backout of that commit, but replaces it with a more rebust
mechanism. Either these commands will complete due to the TARGET RESET, or they
will timeout and be aborted, but they will all complete.

Add assert that all commands are complete to REMOVE_DEVICE completion
routine. We attempt to assure this programatically, so we shouldn't have any
commands in the queue because we've waited for them all. Any commands that make
it into our action routine after we mark the target in removal will complete
immediately with an error.

When we're removing a target that's not a volume, advertise up the stack that
it's actually gone, as opposed to having a transient selection error we should
retry. Do this both in the action routine, and when we get a notification of an
aborted command. We don't do this for volumes because the driver tries hard not
to advertise to the OS a volume has disappeared.

Apply these changes to both mpr and mps since they are based on quite similar
designs.

Discussed with: scottl@
Differential Revision: https://reviews.freebsd.org/D23768
2020-02-25 04:27:23 +00:00
..
amd64 amd64: keep PTE bitmasks in sync with target pmap during pv reclaim 2020-02-18 00:02:20 +00:00
arm Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (13 of many) 2020-02-24 10:45:22 +00:00
arm64 Split out the stage 1 pte bits and add the stage 2 bits 2020-02-24 16:45:31 +00:00
bsm vfs: add realpathat syscall 2020-02-20 16:58:19 +00:00
cam We pass a pointer to the flags to dabitsysctl, not an integer. Adjust the 2020-02-21 22:44:22 +00:00
cddl Remove duplicate dbufs accounting. 2020-02-07 15:50:47 +00:00
compat linuxkpi: Move shmem related functions in it's own file 2020-02-21 09:28:45 +00:00
conf Add a soft-float riscv kernel config 2020-02-24 16:42:44 +00:00
contrib [PowerPC] [Book-E] Fix dpaa interrupt binding. 2020-02-25 03:35:52 +00:00
crypto Fix the armv8 crypto driver after r354170. 2019-10-30 10:41:10 +00:00
ddb Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
dev Before issing the REMOVE_DEVICE command to the firmware, make sure that all 2020-02-25 04:27:23 +00:00
dts Add an overlay for RK3328 USB3 node. 2020-01-29 12:10:42 +00:00
fs Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (10 of many) 2020-02-24 10:37:56 +00:00
gdb Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
geom Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (12 of many) 2020-02-24 10:42:56 +00:00
gnu Import DTS files for riscv from Linux 5.4 2019-12-03 09:12:53 +00:00
i386 i386: remove no longer needed atomic_load_ptr casts 2020-02-14 23:17:37 +00:00
isa sc(4) md bits: stop setting sc->kbd entirely 2019-12-30 02:07:55 +00:00
kern sys/kern: quiet -Wwrite-strings 2020-02-23 03:32:16 +00:00
kgssapi Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
libkern random(9): Deprecate random(9), remove meaningless srandom(9) 2019-12-26 19:41:09 +00:00
mips Although most of the NIC drivers are epoch ready, due to peer pressure 2020-02-24 21:07:30 +00:00
modules linuxkpi: Move shmem related functions in it's own file 2020-02-21 09:28:45 +00:00
net Although most of the NIC drivers are epoch ready, due to peer pressure 2020-02-24 21:07:30 +00:00
net80211 Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
netgraph Rework second part of r357558. Unroll the macro and allocate memory in 2020-02-21 04:18:15 +00:00
netinet Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (14 of many) 2020-02-24 10:47:18 +00:00
netinet6 Fix IPv6 checksums when exthdrs are present. 2020-02-24 19:12:20 +00:00
netipsec netipsec: fix a mismatched uma_zfree -> uma_zfree_pcpu 2020-02-12 20:18:29 +00:00
netpfil Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (6 of many) 2020-02-21 16:23:00 +00:00
netsmb Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
nfs vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
nfsclient
nfsserver
nlm vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
ofed Make sure the VNET is properly set when reaping mbufs in ipoib. 2020-01-11 12:02:16 +00:00
opencrypto Miscellaneous typo fixes 2020-02-07 19:53:07 +00:00
powerpc Unbreak the 32-bit powerpc builds 2020-02-25 02:42:43 +00:00
riscv Add a soft-float riscv kernel config 2020-02-24 16:42:44 +00:00
rpc Change r355157 to make svc_rpc_gss_lifetime_max a static. 2019-11-28 02:18:51 +00:00
security audit: provide audit_canon_path variant which accepts vnodes 2020-02-21 01:40:49 +00:00
sys sys/kern: quiet -Wwrite-strings 2020-02-23 03:32:16 +00:00
teken Adjust teken to allow build as part of loader 2019-09-05 18:07:40 +00:00
tests
tools vfs: stop null checking routines in vop wrappers 2020-01-26 00:41:38 +00:00
ufs Additional KASSERTs to ensure the consistency of the soft updates 2020-02-18 23:56:23 +00:00
vm The last argument to swp_pager_getswapspace is always 1. Remove that argument. 2020-02-24 04:01:09 +00:00
x86 x86/identcpu.c whitespace cleanup. 2020-02-21 16:55:28 +00:00
xdr typo: s/impelmentation/implementation/. 2020-02-07 15:14:29 +00:00
xen
Makefile Remove sparc64 kernel support 2020-02-03 17:35:11 +00:00