13#define OS_QNXNTO_H_CVSID "$Id: os_qnxnto.h 4761 2018-08-20 19:33:04Z chrfranke $\n"
21#ifndef __TYPES_H_INCLUDED
29#include <sys/dcmd_cam.h>
30#include <sys/cam_device.h>
40struct _resmgr_context;
63#define SC_ATA_PT16 0x85
65#define ATA_SMART_LBA_MID_SIG 0x4f
66#define ATA_SMART_LBA_HI_SIG 0xc2
67#define ATA_SMART_SIG 0xc24f
71#define ATA_PROTO_MSK 0x1e
72#define ATA_PROTO_RESPONSE (15 << 1)
73#define ATA_PROTO_FPDMA (12 << 1)
74#define ATA_PROTO_UDMA_DATA_OUT (11 << 1)
75#define ATA_PROTO_UDMA_DATA_IN (10 << 1)
76#define ATA_PROTO_DEVICE_RESET (9 << 1)
77#define ATA_PROTO_DEVICE_DIAGNOSTIC (8 << 1)
78#define ATA_PROTO_DMA_QUEUED (7 << 1)
79#define ATA_PROTO_DMA (6 << 1)
80#define ATA_PROTO_PIO_DATA_OUT (5 << 1)
81#define ATA_PROTO_PIO_DATA_IN (4 << 1)
82#define ATA_PROTO_DATA_NONE (3 << 1)
83#define ATA_PROTO_SRST (1 << 1)
84#define ATA_PROTO_HRST (0 << 1)
85#define ATA_PROTO_EXTEND 0x01
87#define ATA_MCOUNT_MSK 0xe0
89#define ATA_FLG_CK_COND 0x20
90#define ATA_FLG_T_DIR 0x08
91#define ATA_FLG_BYT_BLOK 0x04
92#define ATA_FLG_TLEN_STPSIU 0x03
93#define ATA_FLG_TLEN_SECTOR_COUNT 0x02
94#define ATA_FLG_TLEN_FEATURE 0x01
112#define SENSE_DATA_FMT_DESCRIPTOR 0x02
167#define SENSE_DTYPE_INFORMATION 0x00
168#define SENSE_DTYPE_CSI 0x01
169#define SENSE_DTYPE_SKS 0x02
170#define SENSE_DTYPE_FRU 0x03
171#define SENSE_DTYPE_STREAM 0x04
172#define SENSE_DTYPE_BLOCK 0x05
173#define SENSE_DTYPE_OSD_OBJ_IDENT 0x06
174#define SENSE_DTYPE_OSD_INTEGRITY 0x07
175#define SENSE_DTYPE_OSD_ATR_IDENT 0x08
176#define SENSE_DTYPE_ATA 0x09
180#define ATA_SD_DLEN 0x0c
182#define ATA_SD_FLG_EXTEND 0x01
202 #define ASCQ_FILEMARK_DETECTED 0x01
203 #define ASCQ_EOPM_DETECTED 0x02
204 #define ASCQ_SETMARK_DETECTED 0x03
205 #define ASCQ_BOPM_DETECTED 0x04
207#define SK_RECOVERED 1
208 #define ASC_ATA_PASS_THRU 0x00
209 #define ASCQ_ATA_PASS_THRU_INFO_AVAIL 0x1d
212 #define ASC_NO_SEEK_COMPLETE 0x02
213 #define ASC_NOT_READY 0x04
214 #define ASCQ_CAUSE_NOT_REPORTABLE 0x00
215 #define ASCQ_BECOMING_READY 0x01
216 #define ASCQ_INIT_COMMAND_REQUIRED 0x02
217 #define ASCQ_MANUAL_INTERVENTION_REQUIRED 0x03
218 #define ASCQ_FORMAT_IN_PROGRESS 0x04
219 #define ASCQ_UNKNOWN_CHANGED 0xff
220 #define ASC_MEDIA_FORMAT 0x30
221 #define ASC_MEDIA_NOT_PRESENT 0x3a
222 #define ASC_NOT_CONFIGURED 0x3e
225 #define ASC_UNRECOVERABLE_READ_ERROR 0x11
226 #define ASC_RECORD_NOT_FOUND 0x14
227 #define ASCQ_RECORD_NOT_FOUND 0x01
228 #define ASC_UNABLE_TO_RECOVER_TOC 0x57
229 #define ASC_INCOMPATIBLE_MEDIUM 0x64
232 #define ASC_INTERNAL_TARGET_FAILURE 0x44
233 #define ASC_MEDIA_LOAD_EJECT_FAILURE 0x53
234 #define ASCQ_UNRECOVERABLE_CIRC 0x06
237 #define ASC_INVALID_COMMAND 0x20
238 #define ASC_INVALID_FIELD 0x24
239 #define ASC_INVALID_FIELD_PARAMETER 0x26
240 #define ASC_COMMAND_SEQUENCE_ERROR 0x2c
241 #define ASCQ_READ_SCRAMBLED 0x03
242 #define ASC_ILLEGAL_MODE 0x64
243 #define ASC_COPY_PROTECTION 0x6f
246 #define ASC_MEDIUM_CHANGED 0x28
247 #define ASC_BUS_RESET 0x29
248 #define ASC_INSUFFICIENT_TIME_FOR_OPERATION 0x2e
249 #define ASC_OPERATOR_REQUEST 0x5a
250 #define ASCQ_OPERATOR_MEDIUM_REMOVAL 0x01
252#define SK_DATA_PROT 7
253 #define ASC_WRITE_PROTECTED 0x27
257#define SK_CPY_ABORT 10
258#define SK_CMD_ABORT 11
262#define SK_RESERVED 15
269#define CF_VENDOR0 0x40
270#define CF_VENDOR1 0x80
315#define FU_FMTDAT 0x10
316#define FU_CMPLIST 0x08
330#define FMT_RSVD3 0x80
331#define FMT_SECT_SIZE_CD 0x70
332#define FMT_IMMED 0x08
341#define RW_OPT_RELADR 0x01
342#define RW_OPT_CORRCT 0x02
343#define RW_OPT_FUA 0x08
344#define RW_OPT_DPO 0x10
371#define MSEL_OPT_PF 0x10
372#define MSEL_OPT_SP 0x01
396#define LS_OPT_SP 0x01
397#define LS_OPT_PCR 0x02
399#define LS_PC_CUR_THRESHOLD 0x00
400#define LS_PC_CUR_CUMULATIVE 0x01
401#define LS_PC_DFLT_THRESHOLD 0x02
402#define LS_PC_DFLT_CUMULATIVE 0x03
414#define MSNS_OPT_DBD 0x08
416#define PC_CURRENT 0x00
417#define PC_CHANGEABLE 0x40
418#define PC_DEFAULT 0x80
461#define LD_OPT_IMMED 0x01
465#define LD_CMD_START 0x01
466#define LD_CMD_LOEJ 0x02
467#define LD_CMD_STOP 0x00
468#define LD_CMD_EJECT 0x02
469#define LD_CMD_LOAD 0x03
472#define LD_CMD_SA_HOLD 0x08
473#define LD_CMD_SA_EOT 0x04
474#define LD_CMD_SA_RT 0x02
475#define LD_CMD_SA_LOEJ 0x01
478#define LD_CMD_PC_MSK 0xf0
479#define LD_CMD_PC_NC 0
480#define LD_CMD_PC_ACTIVE 1
481#define LD_CMD_PC_IDLE 2
482#define LD_CMD_PC_STANDBY 3
483#define LD_CMD_PC_SLEEP 5
492#define SC_OPT_RELADR 0x01
493#define SC_OPT_IMMED 0x02
553#define CD_SCAN_DIR_FORWARD 0x00
554#define CD_SCAN_DIR_REVERSE 0x10
557#define CD_SCAN_TYPE_LBA 0x00
558#define CD_SCAN_TYPE_MSF 0x40
559#define CD_SCAN_TYPE_TRK 0x80
560#define CD_SCAN_TYPE_MSK 0xc0
571#define RTOC_OPT_MSF 0x02
573#define RTOC_FMT_TOC 0x0
574#define RTOC_FMT_SESSION 0x1
575#define RTOC_FMT_QSUBCODE 0x2
576#define RTOC_FMT_QSUBCHNL 0x3
577#define RTOC_FMT_ATIP 0x4
578#define RTOC_FMT_CDTEXT 0x5
585#define RTOC_CNTL_FMT_SESSION 0x40
599#define EXCHANGE_OPT_IMMED 0x01
603#define EXCHANGE_CMD_START 0x01
604#define EXCHANGE_CMD_LOEJ 0x02
628#define GE_OPT_POLLED 0x01
632#define NCR_OPERATIONAL_CHANGE 0x02
633#define NCR_POWER_MANAGEMENT 0x04
634#define NCR_EXTERNAL_REQUEST 0x08
635#define NCR_MEDIA 0x10
636#define NCR_MULTI_INITIATOR 0x20
637#define NCR_DEVICE_BUSY 0x40
667#define RSCHNL_OPT_MSF 0x02
669#define RSCHNL_DATA_SUBQ 0x40
679#define CD_FRAME_SYNC_SIZE 12
680#define CD_FRAME_HDR_SIZE 4
681#define CD_FRAME_SUB_HDR_SIZE 8
682#define CD_FRAME_EDC_SIZE 4
683#define CD_FRAME_ECC_SIZE 276
684#define CD_FRAME_AUX_SIZE 8
685#define CD_FRAME_ZERO_SIZE 8
686#define CD_FRAME_SPARE_SIZE 4
687#define CD_FRAME_C2_ERR_SIZE 294
688#define CD_FRAME_BLOCK_ERR_SIZE 2
694#define RDCD_EST_ANY_SECTOR (0 << 2)
695#define RDCD_EST_CDDA_SECTOR (1 << 2)
696#define RDCD_EST_YELLOW_MODE1_SECTOR (2 << 2)
697#define RDCD_EST_YELLOW_MODE2_SECTOR (3 << 2)
698#define RDCD_EST_XA_SECTOR (4 << 2)
699#define RDCD_EST_XA_FORM2_SECTOR (5 << 2)
700#define RDCD_EST_MSK (7 << 2)
704#define RDCD_FLG_SYNC 0x80
705#define RDCD_FLG_UDATA 0x10
706#define RDCD_FLG_ECC 0x08
707#define RDCD_FLG_CD_ERR 0x02
708#define RDCD_FLG_CD_BLOCK_ERR 0x04
709#define RDCD_FLG_HC_NONE ( 0x00 << 5 )
710#define RDCD_FLG_HC_HDR ( 0x01 << 5 )
711#define RDCD_FLG_HC_SUBHEADER ( 0x02 << 5 )
712#define RDCD_FLG_HC_ALL_HEADERS ( 0x03 << 5 )
734#define ATA_PROTO_MSK 0x1e
735#define ATA_PROTO_RESPONSE (15 << 1)
736#define ATA_PROTO_FPDMA (12 << 1)
737#define ATA_PROTO_UDMA_DATA_OUT (11 << 1)
738#define ATA_PROTO_UDMA_DATA_IN (10 << 1)
739#define ATA_PROTO_DEVICE_RESET (9 << 1)
740#define ATA_PROTO_DEVICE_DIAGNOSTIC (8 << 1)
741#define ATA_PROTO_DMA_QUEUED (7 << 1)
742#define ATA_PROTO_DMA (6 << 1)
743#define ATA_PROTO_PIO_DATA_OUT (5 << 1)
744#define ATA_PROTO_PIO_DATA_IN (4 << 1)
745#define ATA_PROTO_DATA_NONE (3 << 1)
746#define ATA_PROTO_SRST (1 << 1)
747#define ATA_PROTO_HRST (0 << 1)
748#define ATA_PROTO_EXTEND 0x01
750#define ATA_MCOUNT_MSK 0xe0
752#define ATA_FLG_CK_COND 0x20
753#define ATA_FLG_T_DIR 0x08
754#define ATA_FLG_BYT_BLOK 0x04
755#define ATA_FLG_TLEN_STPSIU 0x03
756#define ATA_FLG_TLEN_SECTOR_COUNT 0x02
757#define ATA_FLG_TLEN_FEATURE 0x01
778#define ERASE_OPT_LONG 0x01
786#define LOCATE_OPT_CP 0x2
787#define LOCATE_OPT_BT 0x4
803#define RP_OPT_BT 0x01
804#define RP_OPT_LNG 0x02
805#define RP_OPT_TCLP 0x04
813#define SRW_OPT_FIXED 0x01
814#define SRW_OPT_SILI 0x02
831#define SPACE_CODE_BLOCKS 0x00
832#define SPACE_CODE_FMRKS 0x01
833#define SPACE_CODE_SEQ_FMRKS 0x02
834#define SPACE_CODE_EOD 0x03
835#define SPACE_CODE_SMRKS 0x04
836#define SPACE_CODE_SEQ_SMRKS 0x05
844#define WF_OPT_IMMED 0x01
845#define WF_OPT_WSMK 0x02
853#define RD_OPT_MEDIA 0x01
862#define FM_OPT_IMMED 0x01
863#define FM_OPT_VERIFY 0x02
865#define FM_FMT_DFLT 0x00
866#define FM_FMT_PARTITION 0x01
867#define FM_FMT_FORMAT_PARTITION 0x02
struct _eide_identify EIDE_IDENTIFY
struct _drive_attribute DRIVE_ATTRIBUTE
struct _scsi_sense_descriptor SCSI_SENSE_DESCRIPTOR
struct _scsi_sense SCSI_SENSE
struct _ata_pass_thru ata_pass_thru_
struct _scsi_sense_desriptor_header SCSI_SENSE_DESCRIPTOR_HEADER
struct _ata_status_descriptor ATA_STATUS_DESCRIPTOR
SCSI_SENSE_DESCRIPTOR sense
ATA_STATUS_DESCRIPTOR desc
uchar_t allocation_length[2]
struct _cdb::@77 read_write10
struct _cdb::@105 read_position
struct _cdb::@89 play_audio_msf
struct _cdb::@110 report_density
struct _cdb::@109 write_filemarks
struct _cdb::@78 read_write12
struct _cdb::@83 log_sense
struct _cdb::@101 read_cd_msf
struct _cdb::@104 read_block_limits
struct _cdb::@95 get_configuration
struct _cdb::@87 read_disc_information
struct _cdb::@96 get_event
struct _cdb::@106 sa_read_write
struct _cdb::@94 exchange
uchar_t feature_number[2]
struct _cdb::@76 read_write6
uchar_t parameter_pointer[2]
struct _cdb::_ata_pass_thru ata_pass_thru
struct _cdb::@80 mode_select10
struct _cdb::@86 synchronize_cache
struct _cdb::@99 read_subchannel
struct _cdb::@100 read_cd
struct _cdb::_format_unit format_unit
struct _cdb::@97 read_formated_capacities
struct _cdb::@79 mode_select
struct _cdb::@111 format_media
uchar_t allocation_length
struct _cdb::@93 mechanism_status
struct _cdb::@81 log_select
struct _cdb::_format_unit_old format_unit_old
struct _cdb::@98 cd_speed
struct _cdb::@88 pause_resume
struct _cdb::@90 play_audio_ti
struct _cdb::_mode_sense10 mode_sense10
uchar_t transfer_length[3]
struct _cdb::@92 read_toc
struct _cdb::@82 mode_sense