freebsd-skq/sys/dev/mpr
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
..
mpi Update MPI header files version to 2.00.52 from 2.00.48 2018-12-26 10:38:12 +00:00
mpr_config.c Update copyright information 2018-12-26 10:43:31 +00:00
mpr_ioctl.h Update copyright information 2018-12-26 10:43:31 +00:00
mpr_mapping.c Update copyright information 2018-12-26 10:43:31 +00:00
mpr_mapping.h Update copyright information 2018-12-26 10:43:31 +00:00
mpr_pci.c Convert the mpr driver to use busdma templates. 2019-12-24 14:50:17 +00:00
mpr_sas_lsi.c Fix bugs in recovery path and improve cm tracking 2019-07-08 20:20:01 +00:00
mpr_sas.c Before issing the REMOVE_DEVICE command to the firmware, make sure that all 2020-02-25 04:27:23 +00:00
mpr_sas.h Before issing the REMOVE_DEVICE command to the firmware, make sure that all 2020-02-25 04:27:23 +00:00
mpr_table.c Add missing break statements. Coverity CID 1400446. 2019-03-27 12:25:46 +00:00
mpr_table.h Convert some in-line printing of diagnostic into tables. 2017-09-09 22:02:36 +00:00
mpr_user.c Convert the mpr driver to use busdma templates. 2019-12-24 14:50:17 +00:00
mpr.c Advertise the MPI Message Version that's contained in the IOCFacts message 2020-02-07 12:15:39 +00:00
mprvar.h Advertise the MPI Message Version that's contained in the IOCFacts message 2020-02-07 12:15:39 +00:00