summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-11-13 19:23:22 +0000
committermav <mav@FreeBSD.org>2015-11-13 19:23:22 +0000
commit800769b3180e3137c36d2185a689835c2b4dfd28 (patch)
treeeaa968cd8b3e2975bb72f0ced4a5cb2fb6701eb6 /sys/cam
parent8daf7a11eb8011162714afbbdc363b7c232854a7 (diff)
downloadFreeBSD-src-800769b3180e3137c36d2185a689835c2b4dfd28.zip
FreeBSD-src-800769b3180e3137c36d2185a689835c2b4dfd28.tar.gz
MFC r289843: 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.c23
-rw-r--r--sys/cam/scsi/scsi_message.h6
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
+
OpenPOWER on IntegriCloud