2 * Structures and definitions for SCSI commands to Direct Access Devices
6 * Some lines of this file come from a file of the name "scsi.h"
7 * distributed by OSF as part of mach2.5,
8 * so the following disclaimer has been kept.
10 * Copyright 1990 by Open Software Foundation,
15 * Permission to use, copy, modify, and distribute this software and
16 * its documentation for any purpose and without fee is hereby granted,
17 * provided that the above copyright notice appears in all copies and
18 * that both the copyright notice and this permission notice appear in
19 * supporting documentation, and that the name of OSF or Open Software
20 * Foundation not be used in advertising or publicity pertaining to
21 * distribution of the software without specific, written prior
24 * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
25 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
26 * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
27 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
28 * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
29 * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
30 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
34 * Largely written by Julian Elischer (julian@tfs.com)
35 * for TRW Financial Systems.
37 * TRW Financial Systems, in accordance with their agreement with Carnegie
38 * Mellon University, makes this software available to CMU to distribute
39 * or use in any manner that they see fit as long as this message is kept with
40 * the software. For this reason TFS also grants any other persons or
41 * organisations permission to use or modify this software.
43 * TFS supplies this software to be publicly redistributed
44 * on the understanding that TFS is not responsible for the correct
45 * functioning of this software in any circumstances.
47 * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
52 #ifndef _SCSI_SCSI_DA_H
53 #define _SCSI_SCSI_DA_H 1
55 #include <sys/cdefs.h>
57 struct scsi_rezero_unit
60 #define SRZU_LUN_MASK 0xE0
67 * NOTE: The lower three bits of byte2 of the format CDB are the same as
68 * the lower three bits of byte2 of the read defect data CDB, below.
70 struct scsi_format_unit
74 #define FU_FORMAT_MASK SRDD10_DLIST_FORMAT_MASK
75 #define FU_BLOCK_FORMAT SRDD10_BLOCK_FORMAT
76 #define FU_BFI_FORMAT SRDD10_BYTES_FROM_INDEX_FORMAT
77 #define FU_PHYS_FORMAT SRDD10_PHYSICAL_SECTOR_FORMAT
78 #define FU_CMPLST 0x08
79 #define FU_FMT_DATA 0x10
80 u_int8_t vendor_specific;
81 u_int8_t interleave[2];
85 struct scsi_reassign_blocks
93 struct scsi_read_defect_data_10
97 #define SRDD10_GLIST 0x08
98 #define SRDD10_PLIST 0x10
99 #define SRDD10_DLIST_FORMAT_MASK 0x07
100 #define SRDD10_BLOCK_FORMAT 0x00
101 #define SRDD10_EXT_BFI_FORMAT 0x01
102 #define SRDD10_EXT_PHYS_FORMAT 0x02
103 #define SRDD10_LONG_BLOCK_FORMAT 0x03
104 #define SRDD10_BYTES_FROM_INDEX_FORMAT 0x04
105 #define SRDD10_PHYSICAL_SECTOR_FORMAT 0x05
106 #define SRDD10_VENDOR_FORMAT 0x06
109 uint8_t alloc_length[2];
110 #define SRDD10_MAX_LENGTH 0xffff
118 #define SSZ_SERVICE_ACTION_OVERWRITE 0x01
119 #define SSZ_SERVICE_ACTION_BLOCK_ERASE 0x02
120 #define SSZ_SERVICE_ACTION_CRYPTO_ERASE 0x03
121 #define SSZ_SERVICE_ACTION_EXIT_MODE_FAILURE 0x1F
122 #define SSZ_UNRESTRICTED_EXIT 0x20
123 #define SSZ_IMMED 0x80
124 u_int8_t reserved[5];
129 struct scsi_sanitize_parameter_list
132 #define SSZPL_INVERT 0x80
135 /* Variable length initialization pattern. */
136 #define SSZPL_MAX_PATTERN_LENGTH 65535
139 struct scsi_read_defect_data_12
142 #define SRDD12_GLIST 0x08
143 #define SRDD12_PLIST 0x10
144 #define SRDD12_DLIST_FORMAT_MASK 0x07
145 #define SRDD12_BLOCK_FORMAT SRDD10_BLOCK_FORMAT
146 #define SRDD12_BYTES_FROM_INDEX_FORMAT SRDD10_BYTES_FROM_INDEX_FORMAT
147 #define SRDD12_PHYSICAL_SECTOR_FORMAT SRDD10_PHYSICAL_SECTOR_FORMAT
149 uint8_t address_descriptor_index[4];
150 uint8_t alloc_length[4];
151 #define SRDD12_MAX_LENGTH 0xffffffff
159 uint8_t service_action;
160 #define ZBC_OUT_SA_CLOSE 0x01
161 #define ZBC_OUT_SA_FINISH 0x02
162 #define ZBC_OUT_SA_OPEN 0x03
163 #define ZBC_OUT_SA_RWP 0x04
167 #define ZBC_OUT_ALL 0x01
174 uint8_t service_action;
175 #define ZBC_IN_SA_REPORT_ZONES 0x00
176 uint8_t zone_start_lba[8];
178 uint8_t zone_options;
179 #define ZBC_IN_PARTIAL 0x80
180 #define ZBC_IN_REP_ALL_ZONES 0x00
181 #define ZBC_IN_REP_EMPTY 0x01
182 #define ZBC_IN_REP_IMP_OPEN 0x02
183 #define ZBC_IN_REP_EXP_OPEN 0x03
184 #define ZBC_IN_REP_CLOSED 0x04
185 #define ZBC_IN_REP_FULL 0x05
186 #define ZBC_IN_REP_READONLY 0x06
187 #define ZBC_IN_REP_OFFLINE 0x07
188 #define ZBC_IN_REP_RESET 0x10
189 #define ZBC_IN_REP_NON_SEQ 0x11
190 #define ZBC_IN_REP_NON_WP 0x3f
191 #define ZBC_IN_REP_MASK 0x3f
195 struct scsi_report_zones_desc {
197 #define SRZ_TYPE_CONVENTIONAL 0x01
198 #define SRZ_TYPE_SEQ_REQUIRED 0x02
199 #define SRZ_TYPE_SEQ_PREFERRED 0x03
200 #define SRZ_TYPE_MASK 0x0f
202 #define SRZ_ZONE_COND_SHIFT 4
203 #define SRZ_ZONE_COND_MASK 0xf0
204 #define SRZ_ZONE_COND_NWP 0x00
205 #define SRZ_ZONE_COND_EMPTY 0x10
206 #define SRZ_ZONE_COND_IMP_OPEN 0x20
207 #define SRZ_ZONE_COND_EXP_OPEN 0x30
208 #define SRZ_ZONE_COND_CLOSED 0x40
209 #define SRZ_ZONE_COND_READONLY 0xd0
210 #define SRZ_ZONE_COND_FULL 0xe0
211 #define SRZ_ZONE_COND_OFFLINE 0xf0
212 #define SRZ_ZONE_NON_SEQ 0x02
213 #define SRZ_ZONE_RESET 0x01
215 uint8_t zone_length[8];
216 uint8_t zone_start_lba[8];
217 uint8_t write_pointer_lba[8];
218 uint8_t reserved2[32];
221 struct scsi_report_zones_hdr {
224 #define SRZ_SAME_ALL_DIFFERENT 0x00 /* Lengths and types vary */
225 #define SRZ_SAME_ALL_SAME 0x01 /* Lengths and types the same */
226 #define SRZ_SAME_LAST_DIFFERENT 0x02 /* Types same, last length varies */
227 #define SRZ_SAME_TYPES_DIFFERENT 0x03 /* Types vary, length the same */
228 #define SRZ_SAME_MASK 0x0f
230 uint8_t maximum_lba[8];
231 uint8_t reserved2[48];
232 struct scsi_report_zones_desc desc_list[];
238 #define REZERO_UNIT 0x01
239 #define FORMAT_UNIT 0x04
240 #define REASSIGN_BLOCKS 0x07
241 #define MODE_SELECT 0x15
242 #define MODE_SENSE 0x1a
243 #define READ_FORMAT_CAPACITIES 0x23
244 #define WRITE_AND_VERIFY 0x2e
246 #define READ_DEFECT_DATA_10 0x37
247 #define SANITIZE 0x48
250 #define READ_DEFECT_DATA_12 0xb7
252 struct format_defect_list_header
256 #define FU_DLH_VS 0x01
257 #define FU_DLH_IMMED 0x02
258 #define FU_DLH_DSP 0x04
259 #define FU_DLH_IP 0x08
260 #define FU_DLH_STPF 0x10
261 #define FU_DLH_DCRT 0x20
262 #define FU_DLH_DPRY 0x40
263 #define FU_DLH_FOV 0x80
264 u_int8_t defect_list_length[2];
267 struct format_ipat_descriptor
270 #define FU_INIT_NO_HDR 0x00
271 #define FU_INIT_LBA_MSB 0x40
272 #define FU_INIT_LBA_EACH 0x80
273 #define FU_INIT_SI 0x20
274 u_int8_t pattern_type;
275 #define FU_INIT_PAT_DEFAULT 0x00
276 #define FU_INIT_PAT_REPEAT 0x01
277 u_int8_t pat_length[2];
280 struct scsi_read_format_capacities
282 uint8_t opcode; /* READ_FORMAT_CAPACITIES */
284 #define SRFC_LUN_MASK 0xE0
285 uint8_t reserved0[5];
286 uint8_t alloc_length[2];
287 uint8_t reserved1[3];
290 struct scsi_verify_10
292 uint8_t opcode; /* VERIFY(10) */
294 #define SVFY_LUN_MASK 0xE0
295 #define SVFY_RELADR 0x01
296 #define SVFY_BYTCHK 0x02
297 #define SVFY_DPO 0x10
298 uint8_t addr[4]; /* LBA to begin verification at */
300 uint8_t length[2]; /* number of blocks to verify */
304 struct scsi_verify_12
306 uint8_t opcode; /* VERIFY(12) */
308 uint8_t addr[4]; /* LBA to begin verification at */
309 uint8_t length[4]; /* number of blocks to verify */
314 struct scsi_verify_16
316 uint8_t opcode; /* VERIFY(16) */
318 uint8_t addr[8]; /* LBA to begin verification at */
319 uint8_t length[4]; /* number of blocks to verify */
324 struct scsi_compare_and_write
326 uint8_t opcode; /* COMPARE AND WRITE */
328 uint8_t addr[8]; /* LBA to begin verification at */
330 uint8_t length; /* number of blocks */
335 struct scsi_write_and_verify
337 uint8_t opcode; /* WRITE_AND_VERIFY */
339 #define SWVY_LUN_MASK 0xE0
340 #define SWVY_RELADR 0x01
341 #define SWVY_BYTECHK 0x02
342 #define SWVY_DPO 0x10
343 uint8_t addr[4]; /* LBA to begin verification at */
344 uint8_t reserved0[1];
345 uint8_t len[2]; /* number of blocks to write and verify */
346 uint8_t reserved1[3];
350 * Replies to READ_FORMAT_CAPACITIES look like this:
352 * struct format_capacity_list_header
353 * struct format_capacity_descriptor[1..n]
355 * These are similar, but not totally identical to, the
356 * defect list used to format a rigid disk.
358 * The appropriate csio_decode() format string looks like this:
359 * "{} *i3 {Len} i1 {Blocks} i4 {} *b6 {Code} b2 {Blocklen} i3"
361 * If the capacity_list_length is greater than
362 * sizeof(struct format_capacity_descriptor), then there are
363 * additional format capacity descriptors available which
364 * denote which format(s) the drive can handle.
366 * (Source: USB Mass Storage UFI Specification)
369 struct format_capacity_list_header {
371 uint8_t capacity_list_length;
374 struct format_capacity_descriptor {
375 uint8_t nblocks[4]; /* total number of LBAs */
376 uint8_t byte4; /* only present in max/cur descriptor */
377 #define FCD_CODE_MASK 0x03 /* mask for code field above */
378 #define FCD_UNFORMATTED 0x01 /* unformatted media present,
379 * maximum capacity returned */
380 #define FCD_FORMATTED 0x02 /* formatted media present,
381 * current capacity returned */
382 #define FCD_NOMEDIA 0x03 /* no media present,
383 * maximum device capacity returned */
384 uint8_t block_length[3]; /* length of an LBA in bytes */
387 struct scsi_reassign_blocks_data
389 u_int8_t reserved[2];
392 u_int8_t dlbaddr[4]; /* defect logical block address */
393 } defect_descriptor[1];
398 * This is the list header for the READ DEFECT DATA(10) command above.
399 * It may be a bit wrong to append the 10 at the end of the data structure,
400 * since it's only 4 bytes but it does tie it to the 10 byte command.
402 struct scsi_read_defect_data_hdr_10
405 #define SRDDH10_GLIST 0x08
406 #define SRDDH10_PLIST 0x10
407 #define SRDDH10_DLIST_FORMAT_MASK 0x07
408 #define SRDDH10_BLOCK_FORMAT 0x00
409 #define SRDDH10_BYTES_FROM_INDEX_FORMAT 0x04
410 #define SRDDH10_PHYSICAL_SECTOR_FORMAT 0x05
413 #define SRDDH10_MAX_LENGTH SRDD10_MAX_LENGTH - \
414 sizeof(struct scsi_read_defect_data_hdr_10)
417 struct scsi_defect_desc_block
422 struct scsi_defect_desc_long_block
427 struct scsi_defect_desc_bytes_from_index
429 u_int8_t cylinder[3];
431 #define SDD_EXT_BFI_MADS 0x80000000
432 #define SDD_EXT_BFI_FLAG_MASK 0xf0000000
433 #define SDD_EXT_BFI_ENTIRE_TRACK 0x0fffffff
434 u_int8_t bytes_from_index[4];
437 struct scsi_defect_desc_phys_sector
439 u_int8_t cylinder[3];
441 #define SDD_EXT_PHYS_MADS 0x80000000
442 #define SDD_EXT_PHYS_FLAG_MASK 0xf0000000
443 #define SDD_EXT_PHYS_ENTIRE_TRACK 0x0fffffff
447 struct scsi_read_defect_data_hdr_12
450 #define SRDDH12_GLIST 0x08
451 #define SRDDH12_PLIST 0x10
452 #define SRDDH12_DLIST_FORMAT_MASK 0x07
453 #define SRDDH12_BLOCK_FORMAT 0x00
454 #define SRDDH12_BYTES_FROM_INDEX_FORMAT 0x04
455 #define SRDDH12_PHYSICAL_SECTOR_FORMAT 0x05
457 u_int8_t generation[2];
459 #define SRDDH12_MAX_LENGTH SRDD12_MAX_LENGTH - \
460 sizeof(struct scsi_read_defect_data_hdr_12)
463 union disk_pages /* this is the structure copied from osf */
465 struct format_device_page {
466 u_int8_t pg_code; /* page code (should be 3) */
467 #define SMS_FORMAT_DEVICE_PAGE 0x03 /* only 6 bits valid */
468 u_int8_t pg_length; /* page length (should be 0x16) */
469 #define SMS_FORMAT_DEVICE_PLEN 0x16
470 u_int8_t trk_z_1; /* tracks per zone (MSB) */
471 u_int8_t trk_z_0; /* tracks per zone (LSB) */
472 u_int8_t alt_sec_1; /* alternate sectors per zone (MSB) */
473 u_int8_t alt_sec_0; /* alternate sectors per zone (LSB) */
474 u_int8_t alt_trk_z_1; /* alternate tracks per zone (MSB) */
475 u_int8_t alt_trk_z_0; /* alternate tracks per zone (LSB) */
476 u_int8_t alt_trk_v_1; /* alternate tracks per volume (MSB) */
477 u_int8_t alt_trk_v_0; /* alternate tracks per volume (LSB) */
478 u_int8_t ph_sec_t_1; /* physical sectors per track (MSB) */
479 u_int8_t ph_sec_t_0; /* physical sectors per track (LSB) */
480 u_int8_t bytes_s_1; /* bytes per sector (MSB) */
481 u_int8_t bytes_s_0; /* bytes per sector (LSB) */
482 u_int8_t interleave_1; /* interleave (MSB) */
483 u_int8_t interleave_0; /* interleave (LSB) */
484 u_int8_t trk_skew_1; /* track skew factor (MSB) */
485 u_int8_t trk_skew_0; /* track skew factor (LSB) */
486 u_int8_t cyl_skew_1; /* cylinder skew (MSB) */
487 u_int8_t cyl_skew_0; /* cylinder skew (LSB) */
488 u_int8_t flags; /* various */
489 #define DISK_FMT_SURF 0x10
490 #define DISK_FMT_RMB 0x20
491 #define DISK_FMT_HSEC 0x40
492 #define DISK_FMT_SSEC 0x80
497 struct rigid_geometry_page {
498 u_int8_t pg_code; /* page code (should be 4) */
499 #define SMS_RIGID_GEOMETRY_PAGE 0x04
500 u_int8_t pg_length; /* page length (should be 0x16) */
501 #define SMS_RIGID_GEOMETRY_PLEN 0x16
502 u_int8_t ncyl_2; /* number of cylinders (MSB) */
503 u_int8_t ncyl_1; /* number of cylinders */
504 u_int8_t ncyl_0; /* number of cylinders (LSB) */
505 u_int8_t nheads; /* number of heads */
506 u_int8_t st_cyl_wp_2; /* starting cyl., write precomp (MSB) */
507 u_int8_t st_cyl_wp_1; /* starting cyl., write precomp */
508 u_int8_t st_cyl_wp_0; /* starting cyl., write precomp (LSB) */
509 u_int8_t st_cyl_rwc_2; /* starting cyl., red. write cur (MSB)*/
510 u_int8_t st_cyl_rwc_1; /* starting cyl., red. write cur */
511 u_int8_t st_cyl_rwc_0; /* starting cyl., red. write cur (LSB)*/
512 u_int8_t driv_step_1; /* drive step rate (MSB) */
513 u_int8_t driv_step_0; /* drive step rate (LSB) */
514 u_int8_t land_zone_2; /* landing zone cylinder (MSB) */
515 u_int8_t land_zone_1; /* landing zone cylinder */
516 u_int8_t land_zone_0; /* landing zone cylinder (LSB) */
517 u_int8_t rpl; /* rotational position locking (2 bits) */
518 u_int8_t rot_offset; /* rotational offset */
520 u_int8_t medium_rot_rate_1; /* medium rotation rate (RPM) (MSB) */
521 u_int8_t medium_rot_rate_0; /* medium rotation rate (RPM) (LSB) */
525 struct flexible_disk_page {
526 u_int8_t pg_code; /* page code (should be 5) */
527 #define SMS_FLEXIBLE_GEOMETRY_PAGE 0x05
528 u_int8_t pg_length; /* page length (should be 0x1E) */
529 #define SMS_FLEXIBLE_GEOMETRY_PLEN 0x1E
530 u_int8_t xfr_rate_1; /* transfer rate (MSB) */
531 u_int8_t xfr_rate_0; /* transfer rate (LSB) */
532 u_int8_t nheads; /* number of heads */
533 u_int8_t sec_per_track; /* Sectors per track */
534 u_int8_t bytes_s_1; /* bytes per sector (MSB) */
535 u_int8_t bytes_s_0; /* bytes per sector (LSB) */
536 u_int8_t ncyl_1; /* number of cylinders (MSB) */
537 u_int8_t ncyl_0; /* number of cylinders (LSB) */
538 u_int8_t st_cyl_wp_1; /* starting cyl., write precomp (MSB) */
539 u_int8_t st_cyl_wp_0; /* starting cyl., write precomp (LSB) */
540 u_int8_t st_cyl_rwc_1; /* starting cyl., red. write cur (MSB)*/
541 u_int8_t st_cyl_rwc_0; /* starting cyl., red. write cur (LSB)*/
542 u_int8_t driv_step_1; /* drive step rate (MSB) */
543 u_int8_t driv_step_0; /* drive step rate (LSB) */
544 u_int8_t driv_step_pw; /* drive step pulse width */
545 u_int8_t head_stl_del_1;/* Head settle delay (MSB) */
546 u_int8_t head_stl_del_0;/* Head settle delay (LSB) */
547 u_int8_t motor_on_del; /* Motor on delay */
548 u_int8_t motor_off_del; /* Motor off delay */
549 u_int8_t trdy_ssn_mo; /* XXX ??? */
550 u_int8_t spc; /* XXX ??? */
551 u_int8_t write_comp; /* Write compensation */
552 u_int8_t head_load_del; /* Head load delay */
553 u_int8_t head_uload_del;/* Head un-load delay */
556 u_int8_t medium_rot_rate_1; /* medium rotation rate (RPM) (MSB) */
557 u_int8_t medium_rot_rate_0; /* medium rotation rate (RPM) (LSB) */
565 * Here for CTL compatibility, reconcile this.
567 struct scsi_format_page {
570 uint8_t tracks_per_zone[2];
571 uint8_t alt_sectors_per_zone[2];
572 uint8_t alt_tracks_per_zone[2];
573 uint8_t alt_tracks_per_lun[2];
574 uint8_t sectors_per_track[2];
575 uint8_t bytes_per_sector[2];
576 uint8_t interleave[2];
577 uint8_t track_skew[2];
578 uint8_t cylinder_skew[2];
580 #define SFP_SSEC 0x80
581 #define SFP_HSEC 0x40
583 #define SFP_SURF 0x10
589 * Here for CTL compatibility, reconcile this.
591 struct scsi_rigid_disk_page {
593 #define SMS_RIGID_DISK_PAGE 0x04
595 uint8_t cylinders[3];
597 uint8_t start_write_precomp[3];
598 uint8_t start_reduced_current[3];
599 uint8_t step_rate[2];
600 uint8_t landing_zone_cylinder[3];
602 #define SRDP_RPL_DISABLED 0x00
603 #define SRDP_RPL_SLAVE 0x01
604 #define SRDP_RPL_MASTER 0x02
605 #define SRDP_RPL_MASTER_CONTROL 0x03
606 uint8_t rotational_offset;
608 uint8_t rotation_rate[2];
609 uint8_t reserved2[2];
613 struct scsi_da_rw_recovery_page {
615 #define SMS_RW_ERROR_RECOVERY_PAGE 0x01
616 u_int8_t page_length;
618 #define SMS_RWER_AWRE 0x80
619 #define SMS_RWER_ARRE 0x40
620 #define SMS_RWER_TB 0x20
621 #define SMS_RWER_RC 0x10
622 #define SMS_RWER_EER 0x08
623 #define SMS_RWER_PER 0x04
624 #define SMS_RWER_DTE 0x02
625 #define SMS_RWER_DCR 0x01
626 u_int8_t read_retry_count;
627 u_int8_t correction_span;
628 u_int8_t head_offset_count;
629 u_int8_t data_strobe_offset_cnt;
631 #define SMS_RWER_LBPERE 0x80
632 u_int8_t write_retry_count;
634 u_int8_t recovery_time_limit[2];
637 struct scsi_da_verify_recovery_page {
639 #define SMS_VERIFY_ERROR_RECOVERY_PAGE 0x07
640 u_int8_t page_length;
642 #define SMS_VER_EER 0x08
643 #define SMS_VER_PER 0x04
644 #define SMS_VER_DTE 0x02
645 #define SMS_VER_DCR 0x01
646 u_int8_t read_retry_count;
647 u_int8_t reserved[6];
648 u_int8_t recovery_time_limit[2];
653 * XXX These are only left out of the kernel build to silence warnings. If,
654 * for some reason these functions are used in the kernel, the ifdefs should
655 * be moved so they are included both in the kernel and userland.
658 void scsi_format_unit(struct ccb_scsiio *csio, u_int32_t retries,
659 void (*cbfcnp)(struct cam_periph *, union ccb *),
660 u_int8_t tag_action, u_int8_t byte2, u_int16_t ileave,
661 u_int8_t *data_ptr, u_int32_t dxfer_len,
662 u_int8_t sense_len, u_int32_t timeout);
664 void scsi_read_defects(struct ccb_scsiio *csio, uint32_t retries,
665 void (*cbfcnp)(struct cam_periph *, union ccb *),
666 uint8_t tag_action, uint8_t list_format,
667 uint32_t addr_desc_index, uint8_t *data_ptr,
668 uint32_t dxfer_len, int minimum_cmd_size,
669 uint8_t sense_len, uint32_t timeout);
671 void scsi_sanitize(struct ccb_scsiio *csio, u_int32_t retries,
672 void (*cbfcnp)(struct cam_periph *, union ccb *),
673 u_int8_t tag_action, u_int8_t byte2, u_int16_t control,
674 u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len,
677 #endif /* !_KERNEL */
679 void scsi_zbc_out(struct ccb_scsiio *csio, uint32_t retries,
680 void (*cbfcnp)(struct cam_periph *, union ccb *),
681 uint8_t tag_action, uint8_t service_action, uint64_t zone_id,
682 uint8_t zone_flags, uint8_t *data_ptr, uint32_t dxfer_len,
683 uint8_t sense_len, uint32_t timeout);
685 void scsi_zbc_in(struct ccb_scsiio *csio, uint32_t retries,
686 void (*cbfcnp)(struct cam_periph *, union ccb *),
687 uint8_t tag_action, uint8_t service_action,
688 uint64_t zone_start_lba, uint8_t zone_options,
689 uint8_t *data_ptr, uint32_t dxfer_len, uint8_t sense_len,
692 int scsi_ata_zac_mgmt_out(struct ccb_scsiio *csio, uint32_t retries,
693 void (*cbfcnp)(struct cam_periph *, union ccb *),
694 uint8_t tag_action, int use_ncq,
695 uint8_t zm_action, uint64_t zone_id,
696 uint8_t zone_flags, uint8_t *data_ptr,
697 uint32_t dxfer_len, uint8_t *cdb_storage,
698 size_t cdb_storage_len, uint8_t sense_len,
701 int scsi_ata_zac_mgmt_in(struct ccb_scsiio *csio, uint32_t retries,
702 void (*cbfcnp)(struct cam_periph *, union ccb *),
703 uint8_t tag_action, int use_ncq,
704 uint8_t zm_action, uint64_t zone_id,
705 uint8_t zone_flags, uint8_t *data_ptr,
706 uint32_t dxfer_len, uint8_t *cdb_storage,
707 size_t cdb_storage_len, uint8_t sense_len,
712 #endif /* _SCSI_SCSI_DA_H */