2 * Copyright (c) 2003 Silicon Graphics International Corp.
3 * Copyright (c) 2011 Spectra Logic Corporation
4 * Copyright (c) 2014-2017 Alexander Motin <mav@FreeBSD.org>
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions, and the following disclaimer,
12 * without modification.
13 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
14 * substantially similar to the "NO WARRANTY" disclaimer below
15 * ("Disclaimer") and any redistribution must be conditioned upon
16 * including a substantially similar Disclaimer requirement for further
17 * binary redistribution.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGES.
32 * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_ioctl.h#4 $
36 * CAM Target Layer ioctl interface.
38 * Author: Ken Merry <ken@FreeBSD.org>
44 #ifdef ICL_KERNEL_PROXY
45 #include <sys/socket.h>
48 #include <sys/ioccom.h>
50 #define CTL_DEFAULT_DEV "/dev/cam/ctl"
52 * Maximum number of targets we support.
54 #define CTL_MAX_TARGETS 1
57 * Maximum target ID we support.
59 #define CTL_MAX_TARGID 15
62 * Maximum number of LUNs we support at the moment. MUST be a power of 2.
64 #define CTL_MAX_LUNS 1024
67 * Maximum number of initiators per port.
69 #define CTL_MAX_INIT_PER_PORT 2048
72 * Maximum number of ports registered at one time.
74 #define CTL_MAX_PORTS 256
77 * Maximum number of initiators we support.
79 #define CTL_MAX_INITIATORS (CTL_MAX_INIT_PER_PORT * CTL_MAX_PORTS)
81 /* Hopefully this won't conflict with new misc devices that pop up */
84 /* Legacy statistics accumulated for every port for every LU. */
85 #define CTL_LEGACY_STATS 1
90 CTL_DELAY_TYPE_ONESHOT
95 CTL_DELAY_LOC_DATAMOVE,
100 CTL_DELAY_STATUS_NONE,
102 CTL_DELAY_STATUS_INVALID_LUN,
103 CTL_DELAY_STATUS_INVALID_TYPE,
104 CTL_DELAY_STATUS_INVALID_LOC,
105 CTL_DELAY_STATUS_NOT_IMPLEMENTED
108 struct ctl_io_delay_info {
110 ctl_delay_type delay_type;
111 ctl_delay_location delay_loc;
113 ctl_delay_status status;
121 #define CTL_STATS_NUM_TYPES 3
125 CTL_SS_NEED_MORE_SPACE,
130 CTL_STATS_FLAG_NONE = 0x00,
131 CTL_STATS_FLAG_TIME_VALID = 0x01
134 #ifdef CTL_LEGACY_STATS
136 CTL_LUN_STATS_NO_BLOCKSIZE = 0x01
137 } ctl_lun_stats_flags;
139 struct ctl_lun_io_port_stats {
141 uint64_t bytes[CTL_STATS_NUM_TYPES];
142 uint64_t operations[CTL_STATS_NUM_TYPES];
143 struct bintime time[CTL_STATS_NUM_TYPES];
144 uint64_t num_dmas[CTL_STATS_NUM_TYPES];
145 struct bintime dma_time[CTL_STATS_NUM_TYPES];
148 struct ctl_lun_io_stats {
152 ctl_lun_stats_flags flags;
153 struct ctl_lun_io_port_stats ports[CTL_MAX_PORTS];
157 int alloc_len; /* passed to kernel */
158 struct ctl_lun_io_stats *lun_stats; /* passed to/from kernel */
159 int fill_len; /* passed to userland */
160 int num_luns; /* passed to userland */
161 ctl_stats_status status; /* passed to userland */
162 ctl_stats_flags flags; /* passed to userland */
163 struct timespec timestamp; /* passed to userland */
165 #endif /* CTL_LEGACY_STATS */
167 struct ctl_io_stats {
169 uint64_t bytes[CTL_STATS_NUM_TYPES];
170 uint64_t operations[CTL_STATS_NUM_TYPES];
171 uint64_t dmas[CTL_STATS_NUM_TYPES];
172 struct bintime time[CTL_STATS_NUM_TYPES];
173 struct bintime dma_time[CTL_STATS_NUM_TYPES];
176 struct ctl_get_io_stats {
177 struct ctl_io_stats *stats; /* passed to/from kernel */
178 size_t alloc_len; /* passed to kernel */
179 size_t fill_len; /* passed to userland */
180 int first_item; /* passed to kernel */
181 int num_items; /* passed to userland */
182 ctl_stats_status status; /* passed to userland */
183 ctl_stats_flags flags; /* passed to userland */
184 struct timespec timestamp; /* passed to userland */
188 * The types of errors that can be injected:
190 * NONE: No error specified.
191 * ABORTED: SSD_KEY_ABORTED_COMMAND, 0x45, 0x00
192 * MEDIUM_ERR: Medium error, different asc/ascq depending on read/write.
193 * UA: Unit attention.
194 * CUSTOM: User specifies the sense data.
195 * TYPE: Mask to use with error types.
197 * Flags that affect injection behavior:
198 * CONTINUOUS: This error will stay around until explicitly cleared.
199 * DESCRIPTOR: Use descriptor sense instead of fixed sense.
202 CTL_LUN_INJ_NONE = 0x000,
203 CTL_LUN_INJ_ABORTED = 0x001,
204 CTL_LUN_INJ_MEDIUM_ERR = 0x002,
205 CTL_LUN_INJ_UA = 0x003,
206 CTL_LUN_INJ_CUSTOM = 0x004,
207 CTL_LUN_INJ_TYPE = 0x0ff,
208 CTL_LUN_INJ_CONTINUOUS = 0x100,
209 CTL_LUN_INJ_DESCRIPTOR = 0x200
213 * Flags to specify what type of command the given error pattern will
214 * execute on. The first group of types can be ORed together.
216 * READ: Any read command.
217 * WRITE: Any write command.
218 * READWRITE: Any read or write command.
219 * READCAP: Any read capacity command.
220 * TUR: Test Unit Ready.
222 * MASK: Mask for basic command patterns.
226 * CMD: The CDB to act on is specified in struct ctl_error_desc_cmd.
227 * RANGE: For read/write commands, act when the LBA is in the
231 CTL_LUN_PAT_NONE = 0x000,
232 CTL_LUN_PAT_READ = 0x001,
233 CTL_LUN_PAT_WRITE = 0x002,
234 CTL_LUN_PAT_READWRITE = CTL_LUN_PAT_READ | CTL_LUN_PAT_WRITE,
235 CTL_LUN_PAT_READCAP = 0x004,
236 CTL_LUN_PAT_TUR = 0x008,
237 CTL_LUN_PAT_ANY = 0x0ff,
238 CTL_LUN_PAT_MASK = 0x0ff,
239 CTL_LUN_PAT_CMD = 0x100,
240 CTL_LUN_PAT_RANGE = 0x200
241 } ctl_lun_error_pattern;
244 * This structure allows the user to specify a particular CDB pattern to
247 * cdb_pattern: Fill in the relevant bytes to look for in the CDB.
248 * cdb_valid_bytes: Bitmask specifying valid bytes in the cdb_pattern.
249 * flags: Specify any command flags (see ctl_io_flags) that
252 struct ctl_error_desc_cmd {
253 uint8_t cdb_pattern[CTL_MAX_CDBLEN];
254 uint32_t cdb_valid_bytes;
259 * Error injection descriptor.
261 * lun_id LUN to act on.
262 * lun_error: The type of error to inject. See above for descriptions.
263 * error_pattern: What kind of command to act on. See above.
264 * cmd_desc: For CTL_LUN_PAT_CMD only.
265 * lba_range: For CTL_LUN_PAT_RANGE only.
266 * custom_sense: Specify sense. For CTL_LUN_INJ_CUSTOM only.
267 * serial: Serial number returned by the kernel. Use for deletion.
268 * links: Kernel use only.
270 struct ctl_error_desc {
271 uint32_t lun_id; /* To kernel */
272 ctl_lun_error lun_error; /* To kernel */
273 ctl_lun_error_pattern error_pattern; /* To kernel */
274 struct ctl_error_desc_cmd cmd_desc; /* To kernel */
275 struct ctl_lba_len lba_range; /* To kernel */
276 struct scsi_sense_data custom_sense; /* To kernel */
277 uint64_t serial; /* From kernel */
278 STAILQ_ENTRY(ctl_error_desc) links; /* Kernel use only */
282 CTL_OOA_FLAG_NONE = 0x00,
283 CTL_OOA_FLAG_ALL_LUNS = 0x01
288 CTL_OOA_NEED_MORE_SPACE,
290 } ctl_get_ooa_status;
293 CTL_OOACMD_FLAG_NONE = 0x00,
294 CTL_OOACMD_FLAG_DMA = 0x01,
295 CTL_OOACMD_FLAG_BLOCKED = 0x02,
296 CTL_OOACMD_FLAG_ABORT = 0x04,
297 CTL_OOACMD_FLAG_RTR = 0x08,
298 CTL_OOACMD_FLAG_DMA_QUEUED = 0x10
301 struct ctl_ooa_entry {
302 ctl_ooa_cmd_flags cmd_flags;
303 uint8_t cdb[CTL_MAX_CDBLEN];
307 struct bintime start_bt;
311 ctl_ooa_flags flags; /* passed to kernel */
312 uint64_t lun_num; /* passed to kernel */
313 uint32_t alloc_len; /* passed to kernel */
314 uint32_t alloc_num; /* passed to kernel */
315 struct ctl_ooa_entry *entries; /* filled in kernel */
316 uint32_t fill_len; /* passed to userland */
317 uint32_t fill_num; /* passed to userland */
318 uint32_t dropped_num; /* passed to userland */
319 struct bintime cur_bt; /* passed to userland */
320 ctl_get_ooa_status status; /* passed to userland */
330 #define CTL_ERROR_STR_LEN 160
332 #define CTL_BEARG_RD 0x01
333 #define CTL_BEARG_WR 0x02
334 #define CTL_BEARG_RW (CTL_BEARG_RD|CTL_BEARG_WR)
335 #define CTL_BEARG_ASCII 0x04
340 * namelen: Length of the name field, including the terminating NUL.
342 * name: Name of the parameter. This must be NUL-terminated.
344 * flags: Flags for the parameter, see above for values.
346 * vallen: Length of the value in bytes.
348 * value: Value to be set/fetched.
350 * kname: For kernel use only.
352 * kvalue: For kernel use only.
372 * The ID_REQ flag is used to say that the caller has requested a
373 * particular LUN ID in the req_lun_id field. If we cannot allocate that
374 * LUN ID, the ctl_add_lun() call will fail.
376 * The STOPPED flag tells us that the LUN should default to the powered
377 * off state. It will return 0x04,0x02 until it is powered up. ("Logical
378 * unit not ready, initializing command required.")
380 * The NO_MEDIA flag tells us that the LUN has no media inserted.
382 * The PRIMARY flag tells us that this LUN is registered as a Primary LUN
383 * which is accessible via the Master shelf controller in an HA. This flag
384 * being set indicates a Primary LUN. This flag being reset represents a
385 * Secondary LUN controlled by the Secondary controller in an HA
386 * configuration. Flag is applicable at this time to T_DIRECT types.
388 * The SERIAL_NUM flag tells us that the serial_num field is filled in and
389 * valid for use in SCSI INQUIRY VPD page 0x80.
391 * The DEVID flag tells us that the device_id field is filled in and
392 * valid for use in SCSI INQUIRY VPD page 0x83.
394 * The DEV_TYPE flag tells us that the device_type field is filled in.
396 * The EJECTED flag tells us that the removable LUN has tray open.
398 * The UNMAP flag tells us that this LUN supports UNMAP.
400 * The OFFLINE flag tells us that this LUN can not access backing store.
403 CTL_LUN_FLAG_ID_REQ = 0x01,
404 CTL_LUN_FLAG_STOPPED = 0x02,
405 CTL_LUN_FLAG_NO_MEDIA = 0x04,
406 CTL_LUN_FLAG_PRIMARY = 0x08,
407 CTL_LUN_FLAG_SERIAL_NUM = 0x10,
408 CTL_LUN_FLAG_DEVID = 0x20,
409 CTL_LUN_FLAG_DEV_TYPE = 0x40,
410 CTL_LUN_FLAG_UNMAP = 0x80,
411 CTL_LUN_FLAG_EJECTED = 0x100,
412 CTL_LUN_FLAG_READONLY = 0x200
413 } ctl_backend_lun_flags;
416 * LUN creation parameters:
418 * flags: Various LUN flags, see above.
420 * device_type: The SCSI device type. e.g. 0 for Direct Access,
421 * 3 for Processor, etc. Only certain backends may
422 * support setting this field. The CTL_LUN_FLAG_DEV_TYPE
423 * flag should be set in the flags field if the device
426 * lun_size_bytes: The size of the LUN in bytes. For some backends
427 * this is relevant (e.g. ramdisk), for others, it may
428 * be ignored in favor of using the properties of the
429 * backing store. If specified, this should be a
430 * multiple of the blocksize.
432 * The actual size of the LUN is returned in this
435 * blocksize_bytes: The LUN blocksize in bytes. For some backends this
436 * is relevant, for others it may be ignored in
437 * favor of using the properties of the backing store.
439 * The actual blocksize of the LUN is returned in this
442 * req_lun_id: The requested LUN ID. The CTL_LUN_FLAG_ID_REQ flag
443 * should be set if this is set. The request will be
444 * granted if the LUN number is available, otherwise
445 * the LUN addition request will fail.
447 * The allocated LUN number is returned in this field.
449 * serial_num: This is the value returned in SCSI INQUIRY VPD page
450 * 0x80. If it is specified, the CTL_LUN_FLAG_SERIAL_NUM
451 * flag should be set.
453 * The serial number value used is returned in this
456 * device_id: This is the value returned in the T10 vendor ID
457 * based DESIGNATOR field in the SCSI INQUIRY VPD page
458 * 0x83 data. If it is specified, the CTL_LUN_FLAG_DEVID
459 * flag should be set.
461 * The device id value used is returned in this field.
463 struct ctl_lun_create_params {
464 ctl_backend_lun_flags flags;
466 uint64_t lun_size_bytes;
467 uint32_t blocksize_bytes;
469 uint8_t serial_num[CTL_SN_LEN];
470 uint8_t device_id[CTL_DEVID_LEN];
474 * LUN removal parameters:
476 * lun_id: The number of the LUN to delete. This must be set.
477 * The LUN must be backed by the given backend.
479 struct ctl_lun_rm_params {
484 * LUN modification parameters:
486 * lun_id: The number of the LUN to modify. This must be set.
487 * The LUN must be backed by the given backend.
489 * lun_size_bytes: The size of the LUN in bytes. If zero, update
490 * the size using the backing file size, if possible.
492 struct ctl_lun_modify_params {
494 uint64_t lun_size_bytes;
498 * Union of request type data. Fill in the appropriate union member for
501 union ctl_lunreq_data {
502 struct ctl_lun_create_params create;
503 struct ctl_lun_rm_params rm;
504 struct ctl_lun_modify_params modify;
508 * LUN request interface:
510 * backend: This is required, and is NUL-terminated a string
511 * that is the name of the backend, like "ramdisk" or
514 * reqtype: The type of request, CTL_LUNREQ_CREATE to create a
515 * LUN, CTL_LUNREQ_RM to delete a LUN.
517 * reqdata: Request type-specific information. See the
518 * description of individual the union members above
519 * for more information.
521 * num_be_args: This is the number of backend-specific arguments
522 * in the be_args array.
524 * be_args: This is an array of backend-specific arguments.
525 * See above for a description of the fields in this
528 * status: Status of the LUN request.
530 * error_str: If the status is CTL_LUN_ERROR, this will
531 * contain a string describing the error.
533 * kern_be_args: For kernel use only.
536 #define CTL_BE_NAME_LEN 32
537 char backend[CTL_BE_NAME_LEN];
538 ctl_lunreq_type reqtype;
539 union ctl_lunreq_data reqdata;
541 struct ctl_be_arg *be_args;
542 ctl_lun_status status;
543 char error_str[CTL_ERROR_STR_LEN];
544 struct ctl_be_arg *kern_be_args;
552 * OK: Request completed successfully.
554 * NEED_MORE_SPACE: The allocated length of the entries field is too
555 * small for the available data.
557 * ERROR: An error occurred, look at the error string for a
558 * description of the error.
563 CTL_LUN_LIST_NEED_MORE_SPACE,
565 } ctl_lun_list_status;
570 * backend_name: This is a NUL-terminated string. If the string
571 * length is 0, then all LUNs on all backends will
572 * be enumerated. Otherwise this is the name of the
573 * backend to be enumerated, like "ramdisk" or "block".
575 * alloc_len: The length of the data buffer allocated for entries.
576 * In order to properly size the buffer, make one call
577 * with alloc_len set to 0, and then use the returned
578 * dropped_len as the buffer length to allocate and
579 * pass in on a subsequent call.
581 * lun_xml: XML-formatted information on the requested LUNs.
583 * fill_len: The amount of data filled in the storage for entries.
585 * status: The status of the request. See above for the
586 * description of the values of this field.
588 * error_str: If the status indicates an error, this string will
589 * be filled in to describe the error.
591 struct ctl_lun_list {
592 char backend[CTL_BE_NAME_LEN]; /* passed to kernel*/
593 uint32_t alloc_len; /* passed to kernel */
594 char *lun_xml; /* filled in kernel */
595 uint32_t fill_len; /* passed to userland */
596 ctl_lun_list_status status; /* passed to userland */
597 char error_str[CTL_ERROR_STR_LEN];
598 /* passed to userland */
602 * Port request interface:
604 * driver: This is required, and is NUL-terminated a string
605 * that is the name of the frontend, like "iscsi" .
607 * reqtype: The type of request, CTL_REQ_CREATE to create a
608 * port, CTL_REQ_REMOVE to delete a port.
610 * num_be_args: This is the number of frontend-specific arguments
611 * in the be_args array.
613 * be_args: This is an array of frontend-specific arguments.
614 * See above for a description of the fields in this
617 * status: Status of the request.
619 * error_str: If the status is CTL_LUN_ERROR, this will
620 * contain a string describing the error.
622 * kern_be_args: For kernel use only.
631 char driver[CTL_DRIVER_NAME_LEN];
632 ctl_req_type reqtype;
634 struct ctl_be_arg *args;
635 ctl_lun_status status;
636 char error_str[CTL_ERROR_STR_LEN];
637 struct ctl_be_arg *kern_args;
643 * OK: Request completed successfully.
645 * ERROR: An error occurred, look at the error string for a
646 * description of the error.
648 * CTL_ISCSI_LIST_NEED_MORE_SPACE:
649 * User has to pass larger buffer for CTL_ISCSI_LIST ioctl.
654 CTL_ISCSI_LIST_NEED_MORE_SPACE,
655 CTL_ISCSI_SESSION_NOT_FOUND
663 #if defined(ICL_KERNEL_PROXY) || 1
665 * We actually need those in all cases, but leave the ICL_KERNEL_PROXY,
666 * to remember to remove them along with rest of proxy code, eventually.
676 CTL_ISCSI_DIGEST_NONE,
677 CTL_ISCSI_DIGEST_CRC32C
680 #define CTL_ISCSI_NAME_LEN 224 /* 223 bytes, by RFC 3720, + '\0' */
681 #define CTL_ISCSI_ADDR_LEN 47 /* INET6_ADDRSTRLEN + '\0' */
682 #define CTL_ISCSI_ALIAS_LEN 128 /* Arbitrary. */
684 struct ctl_iscsi_handoff_params {
685 char initiator_name[CTL_ISCSI_NAME_LEN];
686 char initiator_addr[CTL_ISCSI_ADDR_LEN];
687 char initiator_alias[CTL_ISCSI_ALIAS_LEN];
688 uint8_t initiator_isid[6];
689 char target_name[CTL_ISCSI_NAME_LEN];
691 int portal_group_tag;
694 * Connection parameters negotiated by ctld(8).
696 ctl_iscsi_digest header_digest;
697 ctl_iscsi_digest data_digest;
700 uint32_t max_recv_data_segment_length;
701 uint32_t max_burst_length;
702 uint32_t first_burst_length;
703 uint32_t immediate_data;
704 #ifdef ICL_KERNEL_PROXY
712 struct ctl_iscsi_list_params {
713 uint32_t alloc_len; /* passed to kernel */
714 char *conn_xml; /* filled in kernel */
715 uint32_t fill_len; /* passed to userland */
719 struct ctl_iscsi_logout_params {
720 int connection_id; /* passed to kernel */
721 char initiator_name[CTL_ISCSI_NAME_LEN];
722 /* passed to kernel */
723 char initiator_addr[CTL_ISCSI_ADDR_LEN];
724 /* passed to kernel */
725 int all; /* passed to kernel */
729 struct ctl_iscsi_terminate_params {
730 int connection_id; /* passed to kernel */
731 char initiator_name[CTL_ISCSI_NAME_LEN];
732 /* passed to kernel */
733 char initiator_addr[CTL_ISCSI_NAME_LEN];
734 /* passed to kernel */
735 int all; /* passed to kernel */
739 #ifdef ICL_KERNEL_PROXY
740 struct ctl_iscsi_listen_params {
745 struct sockaddr *addr;
751 struct ctl_iscsi_accept_params {
754 struct sockaddr *initiator_addr;
755 socklen_t initiator_addrlen;
759 struct ctl_iscsi_send_params {
764 size_t data_segment_len;
769 struct ctl_iscsi_receive_params {
774 size_t data_segment_len;
779 #endif /* ICL_KERNEL_PROXY */
781 union ctl_iscsi_data {
782 struct ctl_iscsi_handoff_params handoff;
783 struct ctl_iscsi_list_params list;
784 struct ctl_iscsi_logout_params logout;
785 struct ctl_iscsi_terminate_params terminate;
786 #ifdef ICL_KERNEL_PROXY
787 struct ctl_iscsi_listen_params listen;
788 struct ctl_iscsi_accept_params accept;
789 struct ctl_iscsi_send_params send;
790 struct ctl_iscsi_receive_params receive;
797 * status: The status of the request. See above for the
798 * description of the values of this field.
800 * error_str: If the status indicates an error, this string will
801 * be filled in to describe the error.
804 ctl_iscsi_type type; /* passed to kernel */
805 union ctl_iscsi_data data; /* passed to kernel */
806 ctl_iscsi_status status; /* passed to userland */
807 char error_str[CTL_ERROR_STR_LEN];
808 /* passed to userland */
817 #define CTL_IO _IOWR(CTL_MINOR, 0x00, union ctl_io)
818 #define CTL_ENABLE_PORT _IOW(CTL_MINOR, 0x04, struct ctl_port_entry)
819 #define CTL_DISABLE_PORT _IOW(CTL_MINOR, 0x05, struct ctl_port_entry)
820 #define CTL_DELAY_IO _IOWR(CTL_MINOR, 0x10, struct ctl_io_delay_info)
821 #define CTL_GETSTATS _IOWR(CTL_MINOR, 0x15, struct ctl_stats)
822 #define CTL_ERROR_INJECT _IOWR(CTL_MINOR, 0x16, struct ctl_error_desc)
823 #define CTL_GET_OOA _IOWR(CTL_MINOR, 0x18, struct ctl_ooa)
824 #define CTL_DUMP_STRUCTS _IO(CTL_MINOR, 0x19)
825 #define CTL_LUN_REQ _IOWR(CTL_MINOR, 0x21, struct ctl_lun_req)
826 #define CTL_LUN_LIST _IOWR(CTL_MINOR, 0x22, struct ctl_lun_list)
827 #define CTL_ERROR_INJECT_DELETE _IOW(CTL_MINOR, 0x23, struct ctl_error_desc)
828 #define CTL_SET_PORT_WWNS _IOW(CTL_MINOR, 0x24, struct ctl_port_entry)
829 #define CTL_ISCSI _IOWR(CTL_MINOR, 0x25, struct ctl_iscsi)
830 #define CTL_PORT_REQ _IOWR(CTL_MINOR, 0x26, struct ctl_req)
831 #define CTL_PORT_LIST _IOWR(CTL_MINOR, 0x27, struct ctl_lun_list)
832 #define CTL_LUN_MAP _IOW(CTL_MINOR, 0x28, struct ctl_lun_map)
833 #define CTL_GET_LUN_STATS _IOWR(CTL_MINOR, 0x29, struct ctl_get_io_stats)
834 #define CTL_GET_PORT_STATS _IOWR(CTL_MINOR, 0x2a, struct ctl_get_io_stats)
836 #endif /* _CTL_IOCTL_H_ */