diff options
author | mav <mav@FreeBSD.org> | 2015-10-23 18:34:18 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-10-23 18:34:18 +0000 |
commit | 9545bdb16492fa66b42f7ac431cfec5437e049ca (patch) | |
tree | a1f9caae91899408b6da57166a54bcb73d9768b9 /sys/cam | |
parent | a1cf517b9773cdac110ae2e070a8b6a211054302 (diff) | |
download | FreeBSD-src-9545bdb16492fa66b42f7ac431cfec5437e049ca.zip FreeBSD-src-9545bdb16492fa66b42f7ac431cfec5437e049ca.tar.gz |
Add partial support for QUERY TMF to CAM and isp(4).
This change allows to decode respective functions in isp(4) in target mode
and pass them through CAM to CTL. Unfortunately neither CAM nor isp(4)
support returning response info for those task management functions now.
On the other side I just have no initiator to test this functionality.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/ctl/scsi_ctl.c | 23 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_message.h | 6 |
2 files changed, 21 insertions, 8 deletions
diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c index 27c5ad7..85a341e 100644 --- a/sys/cam/ctl/scsi_ctl.c +++ b/sys/cam/ctl/scsi_ctl.c @@ -1459,24 +1459,31 @@ ctlfedone(struct cam_periph *periph, union ccb *done_ccb) CTL_TASK_ABORT_TASK_SET; break; case MSG_TARGET_RESET: - io->taskio.task_action = - CTL_TASK_TARGET_RESET; + io->taskio.task_action = CTL_TASK_TARGET_RESET; break; case MSG_ABORT_TASK: - io->taskio.task_action = - CTL_TASK_ABORT_TASK; + io->taskio.task_action = CTL_TASK_ABORT_TASK; break; case MSG_LOGICAL_UNIT_RESET: - io->taskio.task_action = - CTL_TASK_LUN_RESET; + io->taskio.task_action = CTL_TASK_LUN_RESET; break; case MSG_CLEAR_TASK_SET: io->taskio.task_action = - CTL_TASK_CLEAR_TASK_SET; + CTL_TASK_CLEAR_TASK_SET; break; case MSG_CLEAR_ACA: + io->taskio.task_action = CTL_TASK_CLEAR_ACA; + break; + case MSG_QUERY_TASK: + io->taskio.task_action = CTL_TASK_QUERY_TASK; + break; + case MSG_QUERY_TASK_SET: + io->taskio.task_action = + CTL_TASK_QUERY_TASK_SET; + break; + case MSG_QUERY_ASYNC_EVENT: io->taskio.task_action = - CTL_TASK_CLEAR_ACA; + CTL_TASK_QUERY_ASYNC_EVENT; break; case MSG_NOOP: send_ctl_io = 0; diff --git a/sys/cam/scsi/scsi_message.h b/sys/cam/scsi/scsi_message.h index 53b7640..ddac571 100644 --- a/sys/cam/scsi/scsi_message.h +++ b/sys/cam/scsi/scsi_message.h @@ -68,3 +68,9 @@ #define MSG_EXT_PPR_QAS_REQ 0x04 #define MSG_EXT_PPR_DT_REQ 0x02 #define MSG_EXT_PPR_IU_REQ 0x01 + +/* Fake messages not defined for SPI, but needed for other transports */ +#define MSG_QUERY_TASK 0x100 +#define MSG_QUERY_TASK_SET 0x101 +#define MSG_QUERY_ASYNC_EVENT 0x102 + |