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