diff options
author | mav <mav@FreeBSD.org> | 2014-11-09 22:43:29 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-11-09 22:43:29 +0000 |
commit | 99c3fb2ddfe920b5e8fcb76ba755e376e9b24f7c (patch) | |
tree | 51504cd4a2ccef82e5383a19ecef891e3235d5ec /sys/cam/ctl | |
parent | b5d711d3a6940afdd3615f7ffc2dcfa3faacd446 (diff) | |
download | FreeBSD-src-99c3fb2ddfe920b5e8fcb76ba755e376e9b24f7c.zip FreeBSD-src-99c3fb2ddfe920b5e8fcb76ba755e376e9b24f7c.tar.gz |
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.
MFC after: 1 week
Diffstat (limited to 'sys/cam/ctl')
-rw-r--r-- | sys/cam/ctl/ctl.c | 3 | ||||
-rw-r--r-- | sys/cam/ctl/ctl_cmd_table.c | 11 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index b50caad..cd01114 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -8914,7 +8914,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 | |