summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2014-11-16 01:47:43 +0000
committermav <mav@FreeBSD.org>2014-11-16 01:47:43 +0000
commit5966236aa7ac7a9f74c71128b006598c26cb1d67 (patch)
tree938affc1ff2bb83b6f2dde8d9686e2faa95f89ff /sys/cam
parentb24fe3677d8be4f965991d5170dff07d7a0614d1 (diff)
downloadFreeBSD-src-5966236aa7ac7a9f74c71128b006598c26cb1d67.zip
FreeBSD-src-5966236aa7ac7a9f74c71128b006598c26cb1d67.tar.gz
MFC r274333: Handle PREEMPT AND ABORT service action equal to PREEMPT.
With command serialization used in CTL, there are no other commands to abort when PREEMPT AND ABORT gets to run, so it is practically equal to PREEMPT.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ctl/ctl.c3
-rw-r--r--sys/cam/ctl/ctl_cmd_table.c11
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
index 0b776e1..67e3d4b 100644
--- a/sys/cam/ctl/ctl.c
+++ b/sys/cam/ctl/ctl.c
@@ -8691,7 +8691,8 @@ ctl_persistent_reserve_out(struct ctl_scsiio *ctsio)
}
break;
- case SPRO_PREEMPT: {
+ case SPRO_PREEMPT:
+ case SPRO_PRE_ABO: {
int nretval;
nretval = ctl_pro_preempt(softc, lun, res_key, sa_res_key, type,
diff --git a/sys/cam/ctl/ctl_cmd_table.c b/sys/cam/ctl/ctl_cmd_table.c
index 0180cec..fedc110 100644
--- a/sys/cam/ctl/ctl_cmd_table.c
+++ b/sys/cam/ctl/ctl_cmd_table.c
@@ -180,7 +180,16 @@ const struct ctl_cmd_entry ctl_cmd_table_5f[32] =
10, { 0x04, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}},
/* 05 PREEMPT AND ABORT */
-{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
+{ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV |
+ CTL_CMD_FLAG_OK_ON_BOTH |
+ CTL_CMD_FLAG_OK_ON_STOPPED |
+ CTL_CMD_FLAG_OK_ON_INOPERABLE |
+ CTL_CMD_FLAG_OK_ON_OFFLINE |
+ CTL_CMD_FLAG_OK_ON_SECONDARY |
+ CTL_FLAG_DATA_OUT |
+ CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
+ CTL_LUN_PAT_NONE,
+ 10, { 0x05, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}},
/* 06 REGISTER AND IGNORE EXISTING KEY */
{ctl_persistent_reserve_out, CTL_SERIDX_RES, CTL_CMD_FLAG_ALLOW_ON_RESV |
OpenPOWER on IntegriCloud