ctl_private.h revision 288788
1/*-
2 * Copyright (c) 2003, 2004, 2005, 2008 Silicon Graphics International Corp.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 *    notice, this list of conditions, and the following disclaimer,
10 *    without modification.
11 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
12 *    substantially similar to the "NO WARRANTY" disclaimer below
13 *    ("Disclaimer") and any redistribution must be conditioned upon
14 *    including a substantially similar Disclaimer requirement for further
15 *    binary redistribution.
16 *
17 * NO WARRANTY
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGES.
29 *
30 * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_private.h#7 $
31 * $FreeBSD: stable/10/sys/cam/ctl/ctl_private.h 288788 2015-10-05 10:52:22Z mav $
32 */
33/*
34 * CAM Target Layer driver private data structures/definitions.
35 *
36 * Author: Ken Merry <ken@FreeBSD.org>
37 */
38
39#ifndef	_CTL_PRIVATE_H_
40#define	_CTL_PRIVATE_H_
41
42/*
43 * SCSI vendor and product names.
44 */
45#define	CTL_VENDOR		"FREEBSD "
46#define	CTL_DIRECT_PRODUCT	"CTLDISK         "
47#define	CTL_PROCESSOR_PRODUCT	"CTLPROCESSOR    "
48#define	CTL_UNKNOWN_PRODUCT	"CTLDEVICE       "
49
50typedef enum {
51	CTL_IOCTL_INPROG,
52	CTL_IOCTL_DATAMOVE,
53	CTL_IOCTL_DONE
54} ctl_fe_ioctl_state;
55
56struct ctl_fe_ioctl_params {
57	struct cv		sem;
58	struct mtx		ioctl_mtx;
59	ctl_fe_ioctl_state	state;
60};
61
62#define CTL_POOL_ENTRIES_OTHER_SC   200
63
64struct ctl_io_pool {
65	char				name[64];
66	uint32_t			id;
67	struct ctl_softc		*ctl_softc;
68	struct uma_zone			*zone;
69};
70
71typedef enum {
72	CTL_SER_BLOCK,
73	CTL_SER_BLOCKOPT,
74	CTL_SER_EXTENT,
75	CTL_SER_EXTENTOPT,
76	CTL_SER_EXTENTSEQ,
77	CTL_SER_PASS,
78	CTL_SER_SKIP
79} ctl_serialize_action;
80
81typedef enum {
82	CTL_ACTION_BLOCK,
83	CTL_ACTION_OVERLAP,
84	CTL_ACTION_OVERLAP_TAG,
85	CTL_ACTION_PASS,
86	CTL_ACTION_SKIP,
87	CTL_ACTION_ERROR
88} ctl_action;
89
90/*
91 * WARNING:  Keep the bottom nibble here free, we OR in the data direction
92 * flags for each command.
93 *
94 * Note:  "OK_ON_NO_LUN"   == we don't have to have a lun configured
95 *        "OK_ON_BOTH"     == we have to have a lun configured
96 *        "SA5"            == command has 5-bit service action at byte 1
97 */
98typedef enum {
99	CTL_CMD_FLAG_NONE		= 0x0000,
100	CTL_CMD_FLAG_NO_SENSE		= 0x0010,
101	CTL_CMD_FLAG_OK_ON_NO_LUN	= 0x0020,
102	CTL_CMD_FLAG_ALLOW_ON_RESV	= 0x0040,
103	CTL_CMD_FLAG_ALLOW_ON_PR_WRESV	= 0x0080,
104	CTL_CMD_FLAG_OK_ON_PROC		= 0x0100,
105	CTL_CMD_FLAG_OK_ON_SLUN		= 0x0200,
106	CTL_CMD_FLAG_OK_ON_BOTH		= 0x0300,
107	CTL_CMD_FLAG_OK_ON_STOPPED	= 0x0400,
108	CTL_CMD_FLAG_OK_ON_INOPERABLE	= 0x0800,
109	CTL_CMD_FLAG_OK_ON_STANDBY	= 0x1000,
110	CTL_CMD_FLAG_OK_ON_UNAVAIL	= 0x2000,
111	CTL_CMD_FLAG_ALLOW_ON_PR_RESV	= 0x4000,
112	CTL_CMD_FLAG_SA5		= 0x8000,
113	CTL_CMD_FLAG_RUN_HERE		= 0x10000
114} ctl_cmd_flags;
115
116typedef enum {
117	CTL_SERIDX_TUR	= 0,
118	CTL_SERIDX_READ,
119	CTL_SERIDX_WRITE,
120	CTL_SERIDX_UNMAP,
121	CTL_SERIDX_SYNC,
122	CTL_SERIDX_MD_SNS,
123	CTL_SERIDX_MD_SEL,
124	CTL_SERIDX_RQ_SNS,
125	CTL_SERIDX_INQ,
126	CTL_SERIDX_RD_CAP,
127	CTL_SERIDX_RES,
128	CTL_SERIDX_LOG_SNS,
129	CTL_SERIDX_FORMAT,
130	CTL_SERIDX_START,
131	/* TBD: others to be filled in as needed */
132	CTL_SERIDX_COUNT, /* LAST, not a normal code, provides # codes */
133	CTL_SERIDX_INVLD = CTL_SERIDX_COUNT
134} ctl_seridx;
135
136typedef int	ctl_opfunc(struct ctl_scsiio *ctsio);
137
138struct ctl_cmd_entry {
139	ctl_opfunc		*execute;
140	ctl_seridx		seridx;
141	ctl_cmd_flags		flags;
142	ctl_lun_error_pattern	pattern;
143	uint8_t			length;		/* CDB length */
144	uint8_t			usage[15];	/* Mask of allowed CDB bits
145						 * after the opcode byte. */
146};
147
148typedef enum {
149	CTL_LUN_NONE		= 0x000,
150	CTL_LUN_CONTROL		= 0x001,
151	CTL_LUN_RESERVED	= 0x002,
152	CTL_LUN_INVALID		= 0x004,
153	CTL_LUN_DISABLED	= 0x008,
154	CTL_LUN_MALLOCED	= 0x010,
155	CTL_LUN_STOPPED		= 0x020,
156	CTL_LUN_INOPERABLE	= 0x040,
157	CTL_LUN_OFFLINE		= 0x080,
158	CTL_LUN_PR_RESERVED	= 0x100,
159	CTL_LUN_PRIMARY_SC	= 0x200,
160	CTL_LUN_SENSE_DESC	= 0x400,
161	CTL_LUN_READONLY	= 0x800,
162	CTL_LUN_PEER_SC_PRIMARY	= 0x1000
163} ctl_lun_flags;
164
165typedef enum {
166	CTLBLOCK_FLAG_NONE	= 0x00,
167	CTLBLOCK_FLAG_INVALID	= 0x01
168} ctlblock_flags;
169
170union ctl_softcs {
171	struct ctl_softc	*ctl_softc;
172	struct ctlblock_softc	*ctlblock_softc;
173};
174
175/*
176 * Mode page defaults.
177 */
178#if 0
179/*
180 * These values make Solaris trim off some of the capacity.
181 */
182#define	CTL_DEFAULT_SECTORS_PER_TRACK	63
183#define	CTL_DEFAULT_HEADS		255
184/*
185 * These values seem to work okay.
186 */
187#define	CTL_DEFAULT_SECTORS_PER_TRACK	63
188#define	CTL_DEFAULT_HEADS		16
189/*
190 * These values work reasonably well.
191 */
192#define	CTL_DEFAULT_SECTORS_PER_TRACK	512
193#define	CTL_DEFAULT_HEADS		64
194#endif
195
196/*
197 * Solaris is somewhat picky about how many heads and sectors per track you
198 * have defined in mode pages 3 and 4.  These values seem to cause Solaris
199 * to get the capacity more or less right when you run the format tool.
200 * They still have problems when dealing with devices larger than 1TB,
201 * but there isn't anything we can do about that.
202 *
203 * For smaller LUN sizes, this ends up causing the number of cylinders to
204 * work out to 0.  Solaris actually recognizes that and comes up with its
205 * own bogus geometry to fit the actual capacity of the drive.  They really
206 * should just give up on geometry and stick to the read capacity
207 * information alone for modern disk drives.
208 *
209 * One thing worth mentioning about Solaris' mkfs command is that it
210 * doesn't like sectors per track values larger than 256.  512 seems to
211 * work okay for format, but causes problems when you try to make a
212 * filesystem.
213 *
214 * Another caveat about these values:  the product of these two values
215 * really should be a power of 2.  This is because of the simplistic
216 * shift-based calculation that we have to use on the i386 platform to
217 * calculate the number of cylinders here.  (If you use a divide, you end
218 * up calling __udivdi3(), which is a hardware FP call on the PC.  On the
219 * XScale, it is done in software, so you can do that from inside the
220 * kernel.)
221 *
222 * So for the current values (256 S/T, 128 H), we get 32768, which works
223 * very nicely for calculating cylinders.
224 *
225 * If you want to change these values so that their product is no longer a
226 * power of 2, re-visit the calculation in ctl_init_page_index().  You may
227 * need to make it a bit more complicated to get the number of cylinders
228 * right.
229 */
230#define	CTL_DEFAULT_SECTORS_PER_TRACK	256
231#define	CTL_DEFAULT_HEADS		128
232
233#define	CTL_DEFAULT_ROTATION_RATE	SVPD_NON_ROTATING
234
235struct ctl_page_index;
236
237typedef int	ctl_modesen_handler(struct ctl_scsiio *ctsio,
238				    struct ctl_page_index *page_index,
239				    int pc);
240typedef int	ctl_modesel_handler(struct ctl_scsiio *ctsio,
241				    struct ctl_page_index *page_index,
242				    uint8_t *page_ptr);
243
244typedef enum {
245	CTL_PAGE_FLAG_NONE	 = 0x00,
246	CTL_PAGE_FLAG_DISK_ONLY	 = 0x01
247} ctl_page_flags;
248
249struct ctl_page_index {
250	uint8_t			page_code;
251	uint8_t			subpage;
252	uint16_t		page_len;
253	uint8_t			*page_data;
254	ctl_page_flags		page_flags;
255	ctl_modesen_handler	*sense_handler;
256	ctl_modesel_handler	*select_handler;
257};
258
259#define	CTL_PAGE_CURRENT	0x00
260#define	CTL_PAGE_CHANGEABLE	0x01
261#define	CTL_PAGE_DEFAULT	0x02
262#define	CTL_PAGE_SAVED		0x03
263
264#define CTL_NUM_LBP_PARAMS	4
265#define CTL_NUM_LBP_THRESH	4
266#define CTL_LBP_EXPONENT	11	/* 2048 sectors */
267#define CTL_LBP_PERIOD		10	/* 10 seconds */
268#define CTL_LBP_UA_PERIOD	300	/* 5 minutes */
269
270struct ctl_logical_block_provisioning_page {
271	struct scsi_logical_block_provisioning_page	main;
272	struct scsi_logical_block_provisioning_page_descr descr[CTL_NUM_LBP_THRESH];
273};
274
275static const struct ctl_page_index page_index_template[] = {
276	{SMS_RW_ERROR_RECOVERY_PAGE, 0, sizeof(struct scsi_da_rw_recovery_page), NULL,
277	 CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL},
278	{SMS_FORMAT_DEVICE_PAGE, 0, sizeof(struct scsi_format_page), NULL,
279	 CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL},
280	{SMS_RIGID_DISK_PAGE, 0, sizeof(struct scsi_rigid_disk_page), NULL,
281	 CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL},
282	{SMS_CACHING_PAGE, 0, sizeof(struct scsi_caching_page), NULL,
283	 CTL_PAGE_FLAG_DISK_ONLY, NULL, ctl_caching_sp_handler},
284	{SMS_CONTROL_MODE_PAGE, 0, sizeof(struct scsi_control_page), NULL,
285	 CTL_PAGE_FLAG_NONE, NULL, ctl_control_page_handler},
286	{SMS_CONTROL_MODE_PAGE | SMPH_SPF, 0x01,
287	 sizeof(struct scsi_control_ext_page), NULL,
288	 CTL_PAGE_FLAG_NONE, NULL, NULL},
289	{SMS_INFO_EXCEPTIONS_PAGE, 0, sizeof(struct scsi_info_exceptions_page), NULL,
290	 CTL_PAGE_FLAG_NONE, NULL, NULL},
291	{SMS_INFO_EXCEPTIONS_PAGE | SMPH_SPF, 0x02,
292	 sizeof(struct ctl_logical_block_provisioning_page), NULL,
293	 CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL},
294	{SMS_VENDOR_SPECIFIC_PAGE | SMPH_SPF, DBGCNF_SUBPAGE_CODE,
295	 sizeof(struct copan_debugconf_subpage), NULL, CTL_PAGE_FLAG_NONE,
296	 ctl_debugconf_sp_sense_handler, ctl_debugconf_sp_select_handler},
297};
298
299#define	CTL_NUM_MODE_PAGES sizeof(page_index_template)/   \
300			   sizeof(page_index_template[0])
301
302struct ctl_mode_pages {
303	struct scsi_da_rw_recovery_page	rw_er_page[4];
304	struct scsi_format_page		format_page[4];
305	struct scsi_rigid_disk_page	rigid_disk_page[4];
306	struct scsi_caching_page	caching_page[4];
307	struct scsi_control_page	control_page[4];
308	struct scsi_control_ext_page	control_ext_page[4];
309	struct scsi_info_exceptions_page ie_page[4];
310	struct ctl_logical_block_provisioning_page lbp_page[4];
311	struct copan_debugconf_subpage	debugconf_subpage[4];
312	struct ctl_page_index		index[CTL_NUM_MODE_PAGES];
313};
314
315static const struct ctl_page_index log_page_index_template[] = {
316	{SLS_SUPPORTED_PAGES_PAGE, 0, 0, NULL,
317	 CTL_PAGE_FLAG_NONE, NULL, NULL},
318	{SLS_SUPPORTED_PAGES_PAGE, SLS_SUPPORTED_SUBPAGES_SUBPAGE, 0, NULL,
319	 CTL_PAGE_FLAG_NONE, NULL, NULL},
320	{SLS_LOGICAL_BLOCK_PROVISIONING, 0, 0, NULL,
321	 CTL_PAGE_FLAG_NONE, ctl_lbp_log_sense_handler, NULL},
322	{SLS_STAT_AND_PERF, 0, 0, NULL,
323	 CTL_PAGE_FLAG_NONE, ctl_sap_log_sense_handler, NULL},
324};
325
326#define	CTL_NUM_LOG_PAGES sizeof(log_page_index_template)/   \
327			  sizeof(log_page_index_template[0])
328
329struct ctl_log_pages {
330	uint8_t				pages_page[CTL_NUM_LOG_PAGES];
331	uint8_t				subpages_page[CTL_NUM_LOG_PAGES * 2];
332	uint8_t				lbp_page[12*CTL_NUM_LBP_PARAMS];
333	struct stat_page {
334		struct scsi_log_stat_and_perf sap;
335		struct scsi_log_idle_time it;
336		struct scsi_log_time_interval ti;
337	} stat_page;
338	struct ctl_page_index		index[CTL_NUM_LOG_PAGES];
339};
340
341struct ctl_lun_delay_info {
342	ctl_delay_type		datamove_type;
343	uint32_t		datamove_delay;
344	ctl_delay_type		done_type;
345	uint32_t		done_delay;
346};
347
348typedef enum {
349	CTL_ERR_INJ_NONE	= 0x00,
350	CTL_ERR_INJ_ABORTED	= 0x01
351} ctl_err_inject_flags;
352
353typedef enum {
354	CTL_PR_FLAG_NONE	= 0x00,
355	CTL_PR_FLAG_REGISTERED	= 0x01,
356	CTL_PR_FLAG_ACTIVE_RES	= 0x02
357} ctl_per_res_flags;
358
359#define CTL_PR_ALL_REGISTRANTS  0xFFFFFFFF
360#define CTL_PR_NO_RESERVATION   0xFFFFFFF0
361
362struct ctl_devid {
363	int		len;
364	uint8_t		data[];
365};
366
367/*
368 * For report target port groups.
369 */
370#define NUM_TARGET_PORT_GROUPS	2
371
372#define CTL_WRITE_BUFFER_SIZE	262144
373
374struct tpc_list;
375struct ctl_lun {
376	struct mtx			lun_lock;
377	uint64_t			lun;
378	ctl_lun_flags			flags;
379	STAILQ_HEAD(,ctl_error_desc)	error_list;
380	uint64_t			error_serial;
381	struct ctl_softc		*ctl_softc;
382	struct ctl_be_lun		*be_lun;
383	struct ctl_backend_driver	*backend;
384	int				io_count;
385	struct ctl_lun_delay_info	delay_info;
386	int				sync_interval;
387	int				sync_count;
388#ifdef CTL_TIME_IO
389	sbintime_t			idle_time;
390	sbintime_t			last_busy;
391#endif
392	TAILQ_HEAD(ctl_ooaq, ctl_io_hdr)  ooa_queue;
393	TAILQ_HEAD(ctl_blockq,ctl_io_hdr) blocked_queue;
394	STAILQ_ENTRY(ctl_lun)		links;
395	STAILQ_ENTRY(ctl_lun)		run_links;
396#ifdef CTL_WITH_CA
397	uint32_t			have_ca[CTL_MAX_INITIATORS >> 5];
398	struct scsi_sense_data		pending_sense[CTL_MAX_INITIATORS];
399#endif
400	ctl_ua_type			*pending_ua[CTL_MAX_PORTS];
401	uint8_t				ua_tpt_info[8];
402	time_t				lasttpt;
403	struct ctl_mode_pages		mode_pages;
404	struct ctl_log_pages		log_pages;
405	struct ctl_lun_io_stats		stats;
406	uint32_t			res_idx;
407	unsigned int			PRGeneration;
408	uint64_t			*pr_keys[CTL_MAX_PORTS];
409	int				pr_key_count;
410	uint32_t			pr_res_idx;
411	uint8_t				res_type;
412	uint8_t				*write_buffer;
413	struct ctl_devid		*lun_devid;
414	TAILQ_HEAD(tpc_lists, tpc_list) tpc_lists;
415};
416
417typedef enum {
418	CTL_FLAG_REAL_SYNC	= 0x02,
419	CTL_FLAG_ACTIVE_SHELF	= 0x04
420} ctl_gen_flags;
421
422#define CTL_MAX_THREADS		16
423
424struct ctl_thread {
425	struct mtx_padalign queue_lock;
426	struct ctl_softc	*ctl_softc;
427	struct thread		*thread;
428	STAILQ_HEAD(, ctl_io_hdr) incoming_queue;
429	STAILQ_HEAD(, ctl_io_hdr) rtr_queue;
430	STAILQ_HEAD(, ctl_io_hdr) done_queue;
431	STAILQ_HEAD(, ctl_io_hdr) isc_queue;
432};
433
434struct tpc_token;
435struct ctl_softc {
436	struct mtx ctl_lock;
437	struct cdev *dev;
438	int open_count;
439	int num_disks;
440	int num_luns;
441	ctl_gen_flags flags;
442	ctl_ha_mode ha_mode;
443	int ha_id;
444	int is_single;
445	ctl_ha_link_state ha_link;
446	int port_min;
447	int port_max;
448	int port_cnt;
449	int init_min;
450	int init_max;
451	struct sysctl_ctx_list sysctl_ctx;
452	struct sysctl_oid *sysctl_tree;
453	void *othersc_pool;
454	struct proc *ctl_proc;
455	int targ_online;
456	uint32_t ctl_lun_mask[(CTL_MAX_LUNS + 31) / 32];
457	struct ctl_lun *ctl_luns[CTL_MAX_LUNS];
458	uint32_t ctl_port_mask[(CTL_MAX_PORTS + 31) / 32];
459	STAILQ_HEAD(, ctl_lun) lun_list;
460	STAILQ_HEAD(, ctl_be_lun) pending_lun_queue;
461	uint32_t num_frontends;
462	STAILQ_HEAD(, ctl_frontend) fe_list;
463	uint32_t num_ports;
464	STAILQ_HEAD(, ctl_port) port_list;
465	struct ctl_port *ctl_ports[CTL_MAX_PORTS];
466	uint32_t num_backends;
467	STAILQ_HEAD(, ctl_backend_driver) be_list;
468	struct uma_zone *io_zone;
469	uint32_t cur_pool_id;
470	struct ctl_thread threads[CTL_MAX_THREADS];
471	TAILQ_HEAD(tpc_tokens, tpc_token) tpc_tokens;
472	struct callout tpc_timeout;
473	struct mtx tpc_lock;
474};
475
476#ifdef _KERNEL
477
478extern const struct ctl_cmd_entry ctl_cmd_table[256];
479
480uint32_t ctl_get_initindex(struct ctl_nexus *nexus);
481int ctl_lun_map_init(struct ctl_port *port);
482int ctl_lun_map_deinit(struct ctl_port *port);
483int ctl_lun_map_set(struct ctl_port *port, uint32_t plun, uint32_t glun);
484int ctl_lun_map_unset(struct ctl_port *port, uint32_t plun);
485uint32_t ctl_lun_map_from_port(struct ctl_port *port, uint32_t plun);
486uint32_t ctl_lun_map_to_port(struct ctl_port *port, uint32_t glun);
487int ctl_pool_create(struct ctl_softc *ctl_softc, const char *pool_name,
488		    uint32_t total_ctl_io, void **npool);
489void ctl_pool_free(struct ctl_io_pool *pool);
490int ctl_scsi_release(struct ctl_scsiio *ctsio);
491int ctl_scsi_reserve(struct ctl_scsiio *ctsio);
492int ctl_start_stop(struct ctl_scsiio *ctsio);
493int ctl_sync_cache(struct ctl_scsiio *ctsio);
494int ctl_format(struct ctl_scsiio *ctsio);
495int ctl_read_buffer(struct ctl_scsiio *ctsio);
496int ctl_write_buffer(struct ctl_scsiio *ctsio);
497int ctl_write_same(struct ctl_scsiio *ctsio);
498int ctl_unmap(struct ctl_scsiio *ctsio);
499int ctl_mode_select(struct ctl_scsiio *ctsio);
500int ctl_mode_sense(struct ctl_scsiio *ctsio);
501int ctl_log_sense(struct ctl_scsiio *ctsio);
502int ctl_read_capacity(struct ctl_scsiio *ctsio);
503int ctl_read_capacity_16(struct ctl_scsiio *ctsio);
504int ctl_read_defect(struct ctl_scsiio *ctsio);
505int ctl_read_write(struct ctl_scsiio *ctsio);
506int ctl_cnw(struct ctl_scsiio *ctsio);
507int ctl_report_luns(struct ctl_scsiio *ctsio);
508int ctl_request_sense(struct ctl_scsiio *ctsio);
509int ctl_tur(struct ctl_scsiio *ctsio);
510int ctl_verify(struct ctl_scsiio *ctsio);
511int ctl_inquiry(struct ctl_scsiio *ctsio);
512int ctl_persistent_reserve_in(struct ctl_scsiio *ctsio);
513int ctl_persistent_reserve_out(struct ctl_scsiio *ctsio);
514int ctl_report_tagret_port_groups(struct ctl_scsiio *ctsio);
515int ctl_report_supported_opcodes(struct ctl_scsiio *ctsio);
516int ctl_report_supported_tmf(struct ctl_scsiio *ctsio);
517int ctl_report_timestamp(struct ctl_scsiio *ctsio);
518int ctl_get_lba_status(struct ctl_scsiio *ctsio);
519
520void ctl_tpc_init(struct ctl_softc *softc);
521void ctl_tpc_shutdown(struct ctl_softc *softc);
522void ctl_tpc_lun_init(struct ctl_lun *lun);
523void ctl_tpc_lun_shutdown(struct ctl_lun *lun);
524int ctl_inquiry_evpd_tpc(struct ctl_scsiio *ctsio, int alloc_len);
525int ctl_receive_copy_status_lid1(struct ctl_scsiio *ctsio);
526int ctl_receive_copy_failure_details(struct ctl_scsiio *ctsio);
527int ctl_receive_copy_status_lid4(struct ctl_scsiio *ctsio);
528int ctl_receive_copy_operating_parameters(struct ctl_scsiio *ctsio);
529int ctl_extended_copy_lid1(struct ctl_scsiio *ctsio);
530int ctl_extended_copy_lid4(struct ctl_scsiio *ctsio);
531int ctl_copy_operation_abort(struct ctl_scsiio *ctsio);
532int ctl_populate_token(struct ctl_scsiio *ctsio);
533int ctl_write_using_token(struct ctl_scsiio *ctsio);
534int ctl_receive_rod_token_information(struct ctl_scsiio *ctsio);
535int ctl_report_all_rod_tokens(struct ctl_scsiio *ctsio);
536
537#endif	/* _KERNEL */
538
539#endif	/* _CTL_PRIVATE_H_ */
540
541/*
542 * vim: ts=8
543 */
544