FreeBSD kernel CAM code
scsi_cd.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  scsi_get_config
 
struct  scsi_get_config_header
 
struct  scsi_get_config_feature
 
struct  scsi_get_event_status
 
struct  scsi_get_event_status_header
 
struct  scsi_get_event_status_descr
 
struct  scsi_mechanism_status
 
struct  scsi_mechanism_status_header
 
struct  scsi_pause
 
struct  scsi_play_msf
 
struct  scsi_play_track
 
struct  scsi_play_10
 
struct  scsi_play_12
 
struct  scsi_play_rel_12
 
struct  scsi_read_header
 
struct  scsi_read_subchannel
 
struct  scsi_read_toc
 
struct  scsi_read_toc_hdr
 
struct  scsi_read_toc_type01_descr
 
struct  scsi_read_cd_capacity
 
struct  scsi_set_speed
 
struct  scsi_report_key
 
struct  scsi_send_key
 
struct  scsi_read_dvd_structure
 
struct  scsi_report_key_data_header
 
struct  scsi_report_key_data_agid
 
struct  scsi_report_key_data_challenge
 
struct  scsi_report_key_data_key1_key2
 
struct  scsi_report_key_data_title
 
struct  scsi_report_key_data_asf
 
struct  scsi_report_key_data_rpc
 
struct  scsi_send_key_data_rpc
 
struct  scsi_read_dvd_struct_data_header
 
struct  scsi_read_dvd_struct_data_layer_desc
 
struct  scsi_read_dvd_struct_data_physical
 
struct  scsi_read_dvd_struct_data_copyright
 
struct  scsi_read_dvd_struct_data_disc_key
 
struct  scsi_read_dvd_struct_data_bca
 
struct  scsi_read_dvd_struct_data_manufacturer
 
struct  scsi_read_dvd_struct_data_copy_manage
 
struct  scsi_read_dvd_struct_data_prot_discid
 
struct  scsi_read_dvd_struct_data_disc_key_blk
 
struct  scsi_read_dvd_struct_data_dds
 
struct  scsi_read_dvd_struct_data_medium_status
 
struct  scsi_read_dvd_struct_data_spare_area
 
struct  scsi_read_dvd_struct_data_rmd_borderout
 
struct  scsi_read_dvd_struct_data_rmd
 
struct  scsi_read_dvd_struct_data_leadin
 
struct  scsi_read_dvd_struct_data_disc_id
 
struct  scsi_read_dvd_struct_data_generic_dcb
 
struct  scsi_read_dvd_struct_data_dcb
 
struct  read_dvd_struct_write_prot
 
struct  read_dvd_struct_list_entry
 
struct  read_dvd_struct_data_list
 
struct  scsi_read_cd_cap_data
 
struct  cd_audio_page
 
struct  cd_audio_page::port_control
 
struct  scsi_cddvd_capabilities_page_sd
 
struct  scsi_cddvd_capabilities_page
 
union  cd_pages
 
struct  cd_mode_data_10
 
struct  cd_mode_data
 
union  cd_mode_data_6_10
 
struct  cd_mode_params
 

Macros

#define CD_RELADDR   0x01
 
#define CD_MSF   0x02
 
#define SGC_RT_ALL   0x00
 
#define SGC_RT_CURRENT   0x01
 
#define SGC_RT_SPECIFIC   0x02
 
#define SGC_RT_MASK   0x03
 
#define SGC_F_CURRENT   0x01
 
#define SGC_F_PERSISTENT   0x02
 
#define SGC_F_VERSION_MASK   0x2C
 
#define SGC_F_VERSION_SHIFT   2
 
#define SGESN_POLLED   1
 
#define SGESN_NEA   0x80
 
#define PA_PAUSE   1
 
#define PA_RESUME   0
 
#define SRS_SUBQ   0x40
 
#define SRTOC_FORMAT_TOC   0x00
 
#define SRTOC_FORMAT_LAST_ADDR   0x01
 
#define SRTOC_FORMAT_QSUB_TOC   0x02
 
#define SRTOC_FORMAT_QSUB_PMA   0x03
 
#define SRTOC_FORMAT_ATIP   0x04
 
#define SRTOC_FORMAT_CD_TEXT   0x05
 
#define RK_KF_AGID_MASK   0xc0
 
#define RK_KF_AGID_SHIFT   6
 
#define RK_KF_KEYFORMAT_MASK   0x3f
 
#define RK_KF_AGID   0x00
 
#define RK_KF_CHALLENGE   0x01
 
#define RF_KF_KEY1   0x02
 
#define RK_KF_KEY2   0x03
 
#define RF_KF_TITLE   0x04
 
#define RF_KF_ASF   0x05
 
#define RK_KF_RPC_SET   0x06
 
#define RF_KF_RPC_REPORT   0x08
 
#define RF_KF_INV_AGID   0x3f
 
#define RDS_FORMAT_PHYSICAL   0x00
 
#define RDS_FORMAT_COPYRIGHT   0x01
 
#define RDS_FORMAT_DISC_KEY   0x02
 
#define RDS_FORMAT_BCA   0x03
 
#define RDS_FORMAT_MANUFACTURER   0x04
 
#define RDS_FORMAT_CMGS_CPM   0x05
 
#define RDS_FORMAT_PROT_DISCID   0x06
 
#define RDS_FORMAT_DISC_KEY_BLOCK   0x07
 
#define RDS_FORMAT_DDS   0x08
 
#define RDS_FORMAT_DVDRAM_MEDIA_STAT   0x09
 
#define RDS_FORMAT_SPARE_AREA   0x0a
 
#define RDS_FORMAT_RMD_BORDEROUT   0x0c
 
#define RDS_FORMAT_RMD   0x0d
 
#define RDS_FORMAT_LEADIN   0x0e
 
#define RDS_FORMAT_DISC_ID   0x0f
 
#define RDS_FORMAT_DCB   0x30
 
#define RDS_FORMAT_WRITE_PROT   0xc0
 
#define RDS_FORMAT_STRUCTURE_LIST   0xff
 
#define READ_CD_CAPACITY   0x25 /* slightly different from disk */
 
#define READ_SUBCHANNEL   0x42 /* cdrom read Subchannel */
 
#define READ_TOC   0x43 /* cdrom read TOC */
 
#define READ_HEADER   0x44 /* cdrom read header */
 
#define PLAY_10   0x45 /* cdrom play 'play audio' mode */
 
#define GET_CONFIGURATION   0x46 /* Get device configuration */
 
#define PLAY_MSF   0x47 /* cdrom play Min,Sec,Frames mode */
 
#define PLAY_TRACK   0x48 /* cdrom play track/index mode */
 
#define PLAY_TRACK_REL   0x49 /* cdrom play track/index mode */
 
#define GET_EVENT_STATUS   0x4a /* Get event status notification */
 
#define PAUSE   0x4b /* cdrom pause in 'play audio' mode */
 
#define SEND_KEY   0xa3 /* dvd send key command */
 
#define REPORT_KEY   0xa4 /* dvd report key command */
 
#define PLAY_12   0xa5 /* cdrom pause in 'play audio' mode */
 
#define PLAY_TRACK_REL_BIG   0xa9 /* cdrom play track/index mode */
 
#define READ_DVD_STRUCTURE   0xad /* read dvd structure */
 
#define SET_CD_SPEED   0xbb /* set c/dvd speed */
 
#define MECHANISM_STATUS   0xbd /* get status of c/dvd mechanics */
 
#define RKD_AGID_MASK   0xc0
 
#define RKD_AGID_SHIFT   6
 
#define RKD_TITLE_CPM   0x80
 
#define RKD_TITLE_CPM_SHIFT   7
 
#define RKD_TITLE_CP_SEC   0x40
 
#define RKD_TITLE_CP_SEC_SHIFT   6
 
#define RKD_TITLE_CMGS_MASK   0x30
 
#define RKD_TITLE_CMGS_SHIFT   4
 
#define RKD_TITLE_CMGS_NO_RST   0x00
 
#define RKD_TITLE_CMGS_RSVD   0x10
 
#define RKD_TITLE_CMGS_1_GEN   0x20
 
#define RKD_TITLE_CMGS_NO_COPY   0x30
 
#define RKD_ASF_SUCCESS   0x01
 
#define RKD_RPC_SCHEME_UNKNOWN   0x00
 
#define RKD_RPC_SCHEME_PHASE_II   0x01
 
#define RKD_RPC_TYPE_MASK   0xC0
 
#define RKD_RPC_TYPE_SHIFT   6
 
#define RKD_RPC_TYPE_NONE   0x00
 
#define RKD_RPC_TYPE_SET   0x40
 
#define RKD_RPC_TYPE_LAST_CHANCE   0x80
 
#define RKD_RPC_TYPE_PERM   0xC0
 
#define RKD_RPC_VENDOR_RESET_MASK   0x38
 
#define RKD_RPC_VENDOR_RESET_SHIFT   3
 
#define RKD_RPC_USER_RESET_MASK   0x07
 
#define RKD_RPC_USER_RESET_SHIFT   0
 
#define RDSD_BOOK_TYPE_DVD_ROM   0x00
 
#define RDSD_BOOK_TYPE_DVD_RAM   0x10
 
#define RDSD_BOOK_TYPE_DVD_R   0x20
 
#define RDSD_BOOK_TYPE_DVD_RW   0x30
 
#define RDSD_BOOK_TYPE_DVD_PRW   0x90
 
#define RDSD_BOOK_TYPE_MASK   0xf0
 
#define RDSD_BOOK_TYPE_SHIFT   4
 
#define RDSD_BOOK_VERSION_MASK   0x0f
 
#define RDSD_DISC_SIZE_120MM   0x00
 
#define RDSD_DISC_SIZE_80MM   0x10
 
#define RDSD_DISC_SIZE_MASK   0xf0
 
#define RDSD_DISC_SIZE_SHIFT   4
 
#define RDSD_MAX_RATE_0252   0x00
 
#define RDSD_MAX_RATE_0504   0x01
 
#define RDSD_MAX_RATE_1008   0x02
 
#define RDSD_MAX_RATE_NOT_SPEC   0x0f
 
#define RDSD_MAX_RATE_MASK   0x0f
 
#define RDSD_NUM_LAYERS_MASK   0x60
 
#define RDSD_NUM_LAYERS_SHIFT   5
 
#define RDSD_NL_ONE_LAYER   0x00
 
#define RDSD_NL_TWO_LAYERS   0x20
 
#define RDSD_TRACK_PATH_MASK   0x10
 
#define RDSD_TRACK_PATH_SHIFT   4
 
#define RDSD_TP_PTP   0x00
 
#define RDSD_TP_OTP   0x10
 
#define RDSD_LAYER_TYPE_RO   0x01
 
#define RDSD_LAYER_TYPE_RECORD   0x02
 
#define RDSD_LAYER_TYPE_RW   0x04
 
#define RDSD_LAYER_TYPE_MASK   0x0f
 
#define RDSD_LIN_DENSITY_0267   0x00
 
#define RDSD_LIN_DENSITY_0293   0x10
 
#define RDSD_LIN_DENSITY_0409_0435   0x20
 
#define RDSD_LIN_DENSITY_0280_0291   0x40
 
#define RDSD_LIN_DENSITY_0353   0x80
 
#define RDSD_LIN_DENSITY_MASK   0xf0
 
#define RDSD_LIN_DENSITY_SHIFT   4
 
#define RDSD_TRACK_DENSITY_074   0x00
 
#define RDSD_TRACK_DENSITY_080   0x01
 
#define RDSD_TRACK_DENSITY_0615   0x02
 
#define RDSD_TRACK_DENSITY_MASK   0x0f
 
#define RDSD_MAIN_DATA_START_DVD_RO   0x30000
 
#define RDSD_MAIN_DATA_START_DVD_RW   0x31000
 
#define RDSD_BCA   0x80
 
#define RDSD_BCA_MASK   0x80
 
#define RDSD_BCA_SHIFT   7
 
#define RDSD_CPS_NOT_PRESENT   0x00
 
#define RDSD_CPS_DATA_EXISTS   0x01
 
#define RDSD_CPM_NO_COPYRIGHT   0x00
 
#define RDSD_CPM_HAS_COPYRIGHT   0x80
 
#define RDSD_CPM_MASK   0x80
 
#define RDSD_CMGS_COPY_ALLOWED   0x00
 
#define RDSD_CMGS_ONE_COPY   0x20
 
#define RDSD_CMGS_NO_COPIES   0x30
 
#define RDSD_CMGS_MASK   0x30
 
#define RDSD_MS_CARTRIDGE   0x80
 
#define RDSD_MS_OUT   0x40
 
#define RDSD_MS_MSWI   0x08
 
#define RDSD_MS_CWP   0x04
 
#define RDSD_MS_PWP   0x02
 
#define RDSD_DT_NEED_CARTRIDGE   0x00
 
#define RDSD_DT_NO_CART_NEEDED   0x01
 
#define RDSD_SWI_NO_BARE   0x01
 
#define RDSD_SWI_UNSPEC   0xff
 
#define SCSI_RCB
 
#define RDSD_ACTION_RECORDING   0x0001
 
#define RDSD_ACTION_READING   0x0002
 
#define RDSD_ACTION_FORMAT   0x0004
 
#define RDSD_ACTION_MODIFY_DCB   0x0008
 
#define RDSD_WPS_MSWI   0x08
 
#define RDSD_WPS_CWP   0x04
 
#define RDSD_WPS_PWP   0x02
 
#define RDSD_WPS_SWPP   0x01
 
#define RDSD_SDS_NOT_WRITEABLE   0x00
 
#define RDSD_SDS_WRITEABLE   0x80
 
#define RDSD_SDS_MASK   0x80
 
#define RDSD_RDS_NOT_READABLE   0x00
 
#define RDSD_RDS_READABLE   0x40
 
#define RDSD_RDS_MASK   0x40
 
#define CD_PAGE_CODE   0x3F
 
#define AUDIO_PAGE   0x0e
 
#define CD_PAGE_PS   0x80
 
#define CD_PA_SOTC   0x02
 
#define CD_PA_IMMED   0x04
 
#define CD_PA_FORMAT_LBA   0x0F
 
#define CD_PA_APR_VALID   0x80
 
#define CHANNEL   0x0F
 
#define CHANNEL_0   1
 
#define CHANNEL_1   2
 
#define CHANNEL_2   4
 
#define CHANNEL_3   8
 
#define LEFT_CHANNEL   CHANNEL_0
 
#define RIGHT_CHANNEL   CHANNEL_1
 
#define LEFT_PORT   0
 
#define RIGHT_PORT   1
 
#define SMS_CDDVD_CAPS_PAGE   0x2a
 

Functions

__BEGIN_DECLS void scsi_report_key (struct ccb_scsiio *csio, u_int32_t retries, void(*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, u_int32_t lba, u_int8_t agid, u_int8_t key_format, u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, u_int32_t timeout)
 
void scsi_send_key (struct ccb_scsiio *csio, u_int32_t retries, void(*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, u_int8_t agid, u_int8_t key_format, u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, u_int32_t timeout)
 
void scsi_read_dvd_structure (struct ccb_scsiio *csio, u_int32_t retries, void(*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, u_int32_t address, u_int8_t layer_number, u_int8_t format, u_int8_t agid, u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, u_int32_t timeout)
 
void scsi_read_toc (struct ccb_scsiio *csio, uint32_t retries, void(*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, uint8_t byte1_flags, uint8_t format, uint8_t track, uint8_t *data_ptr, uint32_t dxfer_len, int sense_len, int timeout)
 

Macro Definition Documentation

◆ AUDIO_PAGE

#define AUDIO_PAGE   0x0e

Definition at line 767 of file scsi_cd.h.

◆ CD_MSF

#define CD_MSF   0x02

Definition at line 55 of file scsi_cd.h.

◆ CD_PA_APR_VALID

#define CD_PA_APR_VALID   0x80

Definition at line 776 of file scsi_cd.h.

◆ CD_PA_FORMAT_LBA

#define CD_PA_FORMAT_LBA   0x0F

Definition at line 775 of file scsi_cd.h.

◆ CD_PA_IMMED

#define CD_PA_IMMED   0x04

Definition at line 772 of file scsi_cd.h.

◆ CD_PA_SOTC

#define CD_PA_SOTC   0x02

Definition at line 771 of file scsi_cd.h.

◆ CD_PAGE_CODE

#define CD_PAGE_CODE   0x3F

Definition at line 766 of file scsi_cd.h.

◆ CD_PAGE_PS

#define CD_PAGE_PS   0x80

Definition at line 768 of file scsi_cd.h.

◆ CD_RELADDR

#define CD_RELADDR   0x01

Definition at line 54 of file scsi_cd.h.

◆ CHANNEL

#define CHANNEL   0x0F

Definition at line 781 of file scsi_cd.h.

◆ CHANNEL_0

#define CHANNEL_0   1

Definition at line 782 of file scsi_cd.h.

◆ CHANNEL_1

#define CHANNEL_1   2

Definition at line 783 of file scsi_cd.h.

◆ CHANNEL_2

#define CHANNEL_2   4

Definition at line 784 of file scsi_cd.h.

◆ CHANNEL_3

#define CHANNEL_3   8

Definition at line 785 of file scsi_cd.h.

◆ GET_CONFIGURATION

#define GET_CONFIGURATION   0x46 /* Get device configuration */

Definition at line 357 of file scsi_cd.h.

◆ GET_EVENT_STATUS

#define GET_EVENT_STATUS   0x4a /* Get event status notification */

Definition at line 361 of file scsi_cd.h.

◆ LEFT_CHANNEL

#define LEFT_CHANNEL   CHANNEL_0

Definition at line 786 of file scsi_cd.h.

◆ LEFT_PORT

#define LEFT_PORT   0

Definition at line 790 of file scsi_cd.h.

◆ MECHANISM_STATUS

#define MECHANISM_STATUS   0xbd /* get status of c/dvd mechanics */

Definition at line 369 of file scsi_cd.h.

◆ PA_PAUSE

#define PA_PAUSE   1

Definition at line 146 of file scsi_cd.h.

◆ PA_RESUME

#define PA_RESUME   0

Definition at line 147 of file scsi_cd.h.

◆ PAUSE

#define PAUSE   0x4b /* cdrom pause in 'play audio' mode */

Definition at line 362 of file scsi_cd.h.

◆ PLAY_10

#define PLAY_10   0x45 /* cdrom play 'play audio' mode */

Definition at line 356 of file scsi_cd.h.

◆ PLAY_12

#define PLAY_12   0xa5 /* cdrom pause in 'play audio' mode */

Definition at line 365 of file scsi_cd.h.

◆ PLAY_MSF

#define PLAY_MSF   0x47 /* cdrom play Min,Sec,Frames mode */

Definition at line 358 of file scsi_cd.h.

◆ PLAY_TRACK

#define PLAY_TRACK   0x48 /* cdrom play track/index mode */

Definition at line 359 of file scsi_cd.h.

◆ PLAY_TRACK_REL

#define PLAY_TRACK_REL   0x49 /* cdrom play track/index mode */

Definition at line 360 of file scsi_cd.h.

◆ PLAY_TRACK_REL_BIG

#define PLAY_TRACK_REL_BIG   0xa9 /* cdrom play track/index mode */

Definition at line 366 of file scsi_cd.h.

◆ RDS_FORMAT_BCA

#define RDS_FORMAT_BCA   0x03

Definition at line 329 of file scsi_cd.h.

◆ RDS_FORMAT_CMGS_CPM

#define RDS_FORMAT_CMGS_CPM   0x05

Definition at line 331 of file scsi_cd.h.

◆ RDS_FORMAT_COPYRIGHT

#define RDS_FORMAT_COPYRIGHT   0x01

Definition at line 327 of file scsi_cd.h.

◆ RDS_FORMAT_DCB

#define RDS_FORMAT_DCB   0x30

Definition at line 341 of file scsi_cd.h.

◆ RDS_FORMAT_DDS

#define RDS_FORMAT_DDS   0x08

Definition at line 334 of file scsi_cd.h.

◆ RDS_FORMAT_DISC_ID

#define RDS_FORMAT_DISC_ID   0x0f

Definition at line 340 of file scsi_cd.h.

◆ RDS_FORMAT_DISC_KEY

#define RDS_FORMAT_DISC_KEY   0x02

Definition at line 328 of file scsi_cd.h.

◆ RDS_FORMAT_DISC_KEY_BLOCK

#define RDS_FORMAT_DISC_KEY_BLOCK   0x07

Definition at line 333 of file scsi_cd.h.

◆ RDS_FORMAT_DVDRAM_MEDIA_STAT

#define RDS_FORMAT_DVDRAM_MEDIA_STAT   0x09

Definition at line 335 of file scsi_cd.h.

◆ RDS_FORMAT_LEADIN

#define RDS_FORMAT_LEADIN   0x0e

Definition at line 339 of file scsi_cd.h.

◆ RDS_FORMAT_MANUFACTURER

#define RDS_FORMAT_MANUFACTURER   0x04

Definition at line 330 of file scsi_cd.h.

◆ RDS_FORMAT_PHYSICAL

#define RDS_FORMAT_PHYSICAL   0x00

Definition at line 326 of file scsi_cd.h.

◆ RDS_FORMAT_PROT_DISCID

#define RDS_FORMAT_PROT_DISCID   0x06

Definition at line 332 of file scsi_cd.h.

◆ RDS_FORMAT_RMD

#define RDS_FORMAT_RMD   0x0d

Definition at line 338 of file scsi_cd.h.

◆ RDS_FORMAT_RMD_BORDEROUT

#define RDS_FORMAT_RMD_BORDEROUT   0x0c

Definition at line 337 of file scsi_cd.h.

◆ RDS_FORMAT_SPARE_AREA

#define RDS_FORMAT_SPARE_AREA   0x0a

Definition at line 336 of file scsi_cd.h.

◆ RDS_FORMAT_STRUCTURE_LIST

#define RDS_FORMAT_STRUCTURE_LIST   0xff

Definition at line 343 of file scsi_cd.h.

◆ RDS_FORMAT_WRITE_PROT

#define RDS_FORMAT_WRITE_PROT   0xc0

Definition at line 342 of file scsi_cd.h.

◆ RDSD_ACTION_FORMAT

#define RDSD_ACTION_FORMAT   0x0004

Definition at line 706 of file scsi_cd.h.

◆ RDSD_ACTION_MODIFY_DCB

#define RDSD_ACTION_MODIFY_DCB   0x0008

Definition at line 707 of file scsi_cd.h.

◆ RDSD_ACTION_READING

#define RDSD_ACTION_READING   0x0002

Definition at line 705 of file scsi_cd.h.

◆ RDSD_ACTION_RECORDING

#define RDSD_ACTION_RECORDING   0x0001

Definition at line 704 of file scsi_cd.h.

◆ RDSD_BCA

#define RDSD_BCA   0x80

Definition at line 529 of file scsi_cd.h.

◆ RDSD_BCA_MASK

#define RDSD_BCA_MASK   0x80

Definition at line 530 of file scsi_cd.h.

◆ RDSD_BCA_SHIFT

#define RDSD_BCA_SHIFT   7

Definition at line 531 of file scsi_cd.h.

◆ RDSD_BOOK_TYPE_DVD_PRW

#define RDSD_BOOK_TYPE_DVD_PRW   0x90

Definition at line 476 of file scsi_cd.h.

◆ RDSD_BOOK_TYPE_DVD_R

#define RDSD_BOOK_TYPE_DVD_R   0x20

Definition at line 474 of file scsi_cd.h.

◆ RDSD_BOOK_TYPE_DVD_RAM

#define RDSD_BOOK_TYPE_DVD_RAM   0x10

Definition at line 473 of file scsi_cd.h.

◆ RDSD_BOOK_TYPE_DVD_ROM

#define RDSD_BOOK_TYPE_DVD_ROM   0x00

Definition at line 472 of file scsi_cd.h.

◆ RDSD_BOOK_TYPE_DVD_RW

#define RDSD_BOOK_TYPE_DVD_RW   0x30

Definition at line 475 of file scsi_cd.h.

◆ RDSD_BOOK_TYPE_MASK

#define RDSD_BOOK_TYPE_MASK   0xf0

Definition at line 477 of file scsi_cd.h.

◆ RDSD_BOOK_TYPE_SHIFT

#define RDSD_BOOK_TYPE_SHIFT   4

Definition at line 478 of file scsi_cd.h.

◆ RDSD_BOOK_VERSION_MASK

#define RDSD_BOOK_VERSION_MASK   0x0f

Definition at line 479 of file scsi_cd.h.

◆ RDSD_CMGS_COPY_ALLOWED

#define RDSD_CMGS_COPY_ALLOWED   0x00

Definition at line 582 of file scsi_cd.h.

◆ RDSD_CMGS_MASK

#define RDSD_CMGS_MASK   0x30

Definition at line 585 of file scsi_cd.h.

◆ RDSD_CMGS_NO_COPIES

#define RDSD_CMGS_NO_COPIES   0x30

Definition at line 584 of file scsi_cd.h.

◆ RDSD_CMGS_ONE_COPY

#define RDSD_CMGS_ONE_COPY   0x20

Definition at line 583 of file scsi_cd.h.

◆ RDSD_CPM_HAS_COPYRIGHT

#define RDSD_CPM_HAS_COPYRIGHT   0x80

Definition at line 580 of file scsi_cd.h.

◆ RDSD_CPM_MASK

#define RDSD_CPM_MASK   0x80

Definition at line 581 of file scsi_cd.h.

◆ RDSD_CPM_NO_COPYRIGHT

#define RDSD_CPM_NO_COPYRIGHT   0x00

Definition at line 579 of file scsi_cd.h.

◆ RDSD_CPS_DATA_EXISTS

#define RDSD_CPS_DATA_EXISTS   0x01

Definition at line 548 of file scsi_cd.h.

◆ RDSD_CPS_NOT_PRESENT

#define RDSD_CPS_NOT_PRESENT   0x00

Definition at line 547 of file scsi_cd.h.

◆ RDSD_DISC_SIZE_120MM

#define RDSD_DISC_SIZE_120MM   0x00

Definition at line 485 of file scsi_cd.h.

◆ RDSD_DISC_SIZE_80MM

#define RDSD_DISC_SIZE_80MM   0x10

Definition at line 486 of file scsi_cd.h.

◆ RDSD_DISC_SIZE_MASK

#define RDSD_DISC_SIZE_MASK   0xf0

Definition at line 487 of file scsi_cd.h.

◆ RDSD_DISC_SIZE_SHIFT

#define RDSD_DISC_SIZE_SHIFT   4

Definition at line 488 of file scsi_cd.h.

◆ RDSD_DT_NEED_CARTRIDGE

#define RDSD_DT_NEED_CARTRIDGE   0x00

Definition at line 624 of file scsi_cd.h.

◆ RDSD_DT_NO_CART_NEEDED

#define RDSD_DT_NO_CART_NEEDED   0x01

Definition at line 625 of file scsi_cd.h.

◆ RDSD_LAYER_TYPE_MASK

#define RDSD_LAYER_TYPE_MASK   0x0f

Definition at line 506 of file scsi_cd.h.

◆ RDSD_LAYER_TYPE_RECORD

#define RDSD_LAYER_TYPE_RECORD   0x02

Definition at line 504 of file scsi_cd.h.

◆ RDSD_LAYER_TYPE_RO

#define RDSD_LAYER_TYPE_RO   0x01

Definition at line 503 of file scsi_cd.h.

◆ RDSD_LAYER_TYPE_RW

#define RDSD_LAYER_TYPE_RW   0x04

Definition at line 505 of file scsi_cd.h.

◆ RDSD_LIN_DENSITY_0267

#define RDSD_LIN_DENSITY_0267   0x00

Definition at line 508 of file scsi_cd.h.

◆ RDSD_LIN_DENSITY_0280_0291

#define RDSD_LIN_DENSITY_0280_0291   0x40

Definition at line 511 of file scsi_cd.h.

◆ RDSD_LIN_DENSITY_0293

#define RDSD_LIN_DENSITY_0293   0x10

Definition at line 509 of file scsi_cd.h.

◆ RDSD_LIN_DENSITY_0353

#define RDSD_LIN_DENSITY_0353   0x80

Definition at line 513 of file scsi_cd.h.

◆ RDSD_LIN_DENSITY_0409_0435

#define RDSD_LIN_DENSITY_0409_0435   0x20

Definition at line 510 of file scsi_cd.h.

◆ RDSD_LIN_DENSITY_MASK

#define RDSD_LIN_DENSITY_MASK   0xf0

Definition at line 514 of file scsi_cd.h.

◆ RDSD_LIN_DENSITY_SHIFT

#define RDSD_LIN_DENSITY_SHIFT   4

Definition at line 515 of file scsi_cd.h.

◆ RDSD_MAIN_DATA_START_DVD_RO

#define RDSD_MAIN_DATA_START_DVD_RO   0x30000

Definition at line 522 of file scsi_cd.h.

◆ RDSD_MAIN_DATA_START_DVD_RW

#define RDSD_MAIN_DATA_START_DVD_RW   0x31000

Definition at line 523 of file scsi_cd.h.

◆ RDSD_MAX_RATE_0252

#define RDSD_MAX_RATE_0252   0x00

Definition at line 489 of file scsi_cd.h.

◆ RDSD_MAX_RATE_0504

#define RDSD_MAX_RATE_0504   0x01

Definition at line 490 of file scsi_cd.h.

◆ RDSD_MAX_RATE_1008

#define RDSD_MAX_RATE_1008   0x02

Definition at line 491 of file scsi_cd.h.

◆ RDSD_MAX_RATE_MASK

#define RDSD_MAX_RATE_MASK   0x0f

Definition at line 493 of file scsi_cd.h.

◆ RDSD_MAX_RATE_NOT_SPEC

#define RDSD_MAX_RATE_NOT_SPEC   0x0f

Definition at line 492 of file scsi_cd.h.

◆ RDSD_MS_CARTRIDGE

#define RDSD_MS_CARTRIDGE   0x80

Definition at line 618 of file scsi_cd.h.

◆ RDSD_MS_CWP

#define RDSD_MS_CWP   0x04

Definition at line 621 of file scsi_cd.h.

◆ RDSD_MS_MSWI

#define RDSD_MS_MSWI   0x08

Definition at line 620 of file scsi_cd.h.

◆ RDSD_MS_OUT

#define RDSD_MS_OUT   0x40

Definition at line 619 of file scsi_cd.h.

◆ RDSD_MS_PWP

#define RDSD_MS_PWP   0x02

Definition at line 622 of file scsi_cd.h.

◆ RDSD_NL_ONE_LAYER

#define RDSD_NL_ONE_LAYER   0x00

Definition at line 497 of file scsi_cd.h.

◆ RDSD_NL_TWO_LAYERS

#define RDSD_NL_TWO_LAYERS   0x20

Definition at line 498 of file scsi_cd.h.

◆ RDSD_NUM_LAYERS_MASK

#define RDSD_NUM_LAYERS_MASK   0x60

Definition at line 495 of file scsi_cd.h.

◆ RDSD_NUM_LAYERS_SHIFT

#define RDSD_NUM_LAYERS_SHIFT   5

Definition at line 496 of file scsi_cd.h.

◆ RDSD_RDS_MASK

#define RDSD_RDS_MASK   0x40

Definition at line 740 of file scsi_cd.h.

◆ RDSD_RDS_NOT_READABLE

#define RDSD_RDS_NOT_READABLE   0x00

Definition at line 738 of file scsi_cd.h.

◆ RDSD_RDS_READABLE

#define RDSD_RDS_READABLE   0x40

Definition at line 739 of file scsi_cd.h.

◆ RDSD_SDS_MASK

#define RDSD_SDS_MASK   0x80

Definition at line 737 of file scsi_cd.h.

◆ RDSD_SDS_NOT_WRITEABLE

#define RDSD_SDS_NOT_WRITEABLE   0x00

Definition at line 735 of file scsi_cd.h.

◆ RDSD_SDS_WRITEABLE

#define RDSD_SDS_WRITEABLE   0x80

Definition at line 736 of file scsi_cd.h.

◆ RDSD_SWI_NO_BARE

#define RDSD_SWI_NO_BARE   0x01

Definition at line 628 of file scsi_cd.h.

◆ RDSD_SWI_UNSPEC

#define RDSD_SWI_UNSPEC   0xff

Definition at line 629 of file scsi_cd.h.

◆ RDSD_TP_OTP

#define RDSD_TP_OTP   0x10

Definition at line 502 of file scsi_cd.h.

◆ RDSD_TP_PTP

#define RDSD_TP_PTP   0x00

Definition at line 501 of file scsi_cd.h.

◆ RDSD_TRACK_DENSITY_0615

#define RDSD_TRACK_DENSITY_0615   0x02

Definition at line 518 of file scsi_cd.h.

◆ RDSD_TRACK_DENSITY_074

#define RDSD_TRACK_DENSITY_074   0x00

Definition at line 516 of file scsi_cd.h.

◆ RDSD_TRACK_DENSITY_080

#define RDSD_TRACK_DENSITY_080   0x01

Definition at line 517 of file scsi_cd.h.

◆ RDSD_TRACK_DENSITY_MASK

#define RDSD_TRACK_DENSITY_MASK   0x0f

Definition at line 519 of file scsi_cd.h.

◆ RDSD_TRACK_PATH_MASK

#define RDSD_TRACK_PATH_MASK   0x10

Definition at line 499 of file scsi_cd.h.

◆ RDSD_TRACK_PATH_SHIFT

#define RDSD_TRACK_PATH_SHIFT   4

Definition at line 500 of file scsi_cd.h.

◆ RDSD_WPS_CWP

#define RDSD_WPS_CWP   0x04

Definition at line 725 of file scsi_cd.h.

◆ RDSD_WPS_MSWI

#define RDSD_WPS_MSWI   0x08

Definition at line 724 of file scsi_cd.h.

◆ RDSD_WPS_PWP

#define RDSD_WPS_PWP   0x02

Definition at line 726 of file scsi_cd.h.

◆ RDSD_WPS_SWPP

#define RDSD_WPS_SWPP   0x01

Definition at line 727 of file scsi_cd.h.

◆ READ_CD_CAPACITY

#define READ_CD_CAPACITY   0x25 /* slightly different from disk */

Definition at line 352 of file scsi_cd.h.

◆ READ_DVD_STRUCTURE

#define READ_DVD_STRUCTURE   0xad /* read dvd structure */

Definition at line 367 of file scsi_cd.h.

◆ READ_HEADER

#define READ_HEADER   0x44 /* cdrom read header */

Definition at line 355 of file scsi_cd.h.

◆ READ_SUBCHANNEL

#define READ_SUBCHANNEL   0x42 /* cdrom read Subchannel */

Definition at line 353 of file scsi_cd.h.

◆ READ_TOC

#define READ_TOC   0x43 /* cdrom read TOC */

Definition at line 354 of file scsi_cd.h.

◆ REPORT_KEY

#define REPORT_KEY   0xa4 /* dvd report key command */

Definition at line 364 of file scsi_cd.h.

◆ RF_KF_ASF

#define RF_KF_ASF   0x05

Definition at line 300 of file scsi_cd.h.

◆ RF_KF_INV_AGID

#define RF_KF_INV_AGID   0x3f

Definition at line 303 of file scsi_cd.h.

◆ RF_KF_KEY1

#define RF_KF_KEY1   0x02

Definition at line 297 of file scsi_cd.h.

◆ RF_KF_RPC_REPORT

#define RF_KF_RPC_REPORT   0x08

Definition at line 302 of file scsi_cd.h.

◆ RF_KF_TITLE

#define RF_KF_TITLE   0x04

Definition at line 299 of file scsi_cd.h.

◆ RIGHT_CHANNEL

#define RIGHT_CHANNEL   CHANNEL_1

Definition at line 787 of file scsi_cd.h.

◆ RIGHT_PORT

#define RIGHT_PORT   1

Definition at line 791 of file scsi_cd.h.

◆ RK_KF_AGID

#define RK_KF_AGID   0x00

Definition at line 295 of file scsi_cd.h.

◆ RK_KF_AGID_MASK

#define RK_KF_AGID_MASK   0xc0

Definition at line 292 of file scsi_cd.h.

◆ RK_KF_AGID_SHIFT

#define RK_KF_AGID_SHIFT   6

Definition at line 293 of file scsi_cd.h.

◆ RK_KF_CHALLENGE

#define RK_KF_CHALLENGE   0x01

Definition at line 296 of file scsi_cd.h.

◆ RK_KF_KEY2

#define RK_KF_KEY2   0x03

Definition at line 298 of file scsi_cd.h.

◆ RK_KF_KEYFORMAT_MASK

#define RK_KF_KEYFORMAT_MASK   0x3f

Definition at line 294 of file scsi_cd.h.

◆ RK_KF_RPC_SET

#define RK_KF_RPC_SET   0x06

Definition at line 301 of file scsi_cd.h.

◆ RKD_AGID_MASK

#define RKD_AGID_MASK   0xc0

Definition at line 382 of file scsi_cd.h.

◆ RKD_AGID_SHIFT

#define RKD_AGID_SHIFT   6

Definition at line 383 of file scsi_cd.h.

◆ RKD_ASF_SUCCESS

#define RKD_ASF_SUCCESS   0x01

Definition at line 426 of file scsi_cd.h.

◆ RKD_RPC_SCHEME_PHASE_II

#define RKD_RPC_SCHEME_PHASE_II   0x01

Definition at line 434 of file scsi_cd.h.

◆ RKD_RPC_SCHEME_UNKNOWN

#define RKD_RPC_SCHEME_UNKNOWN   0x00

Definition at line 433 of file scsi_cd.h.

◆ RKD_RPC_TYPE_LAST_CHANCE

#define RKD_RPC_TYPE_LAST_CHANCE   0x80

Definition at line 441 of file scsi_cd.h.

◆ RKD_RPC_TYPE_MASK

#define RKD_RPC_TYPE_MASK   0xC0

Definition at line 437 of file scsi_cd.h.

◆ RKD_RPC_TYPE_NONE

#define RKD_RPC_TYPE_NONE   0x00

Definition at line 439 of file scsi_cd.h.

◆ RKD_RPC_TYPE_PERM

#define RKD_RPC_TYPE_PERM   0xC0

Definition at line 442 of file scsi_cd.h.

◆ RKD_RPC_TYPE_SET

#define RKD_RPC_TYPE_SET   0x40

Definition at line 440 of file scsi_cd.h.

◆ RKD_RPC_TYPE_SHIFT

#define RKD_RPC_TYPE_SHIFT   6

Definition at line 438 of file scsi_cd.h.

◆ RKD_RPC_USER_RESET_MASK

#define RKD_RPC_USER_RESET_MASK   0x07

Definition at line 445 of file scsi_cd.h.

◆ RKD_RPC_USER_RESET_SHIFT

#define RKD_RPC_USER_RESET_SHIFT   0

Definition at line 446 of file scsi_cd.h.

◆ RKD_RPC_VENDOR_RESET_MASK

#define RKD_RPC_VENDOR_RESET_MASK   0x38

Definition at line 443 of file scsi_cd.h.

◆ RKD_RPC_VENDOR_RESET_SHIFT

#define RKD_RPC_VENDOR_RESET_SHIFT   3

Definition at line 444 of file scsi_cd.h.

◆ RKD_TITLE_CMGS_1_GEN

#define RKD_TITLE_CMGS_1_GEN   0x20

Definition at line 415 of file scsi_cd.h.

◆ RKD_TITLE_CMGS_MASK

#define RKD_TITLE_CMGS_MASK   0x30

Definition at line 411 of file scsi_cd.h.

◆ RKD_TITLE_CMGS_NO_COPY

#define RKD_TITLE_CMGS_NO_COPY   0x30

Definition at line 416 of file scsi_cd.h.

◆ RKD_TITLE_CMGS_NO_RST

#define RKD_TITLE_CMGS_NO_RST   0x00

Definition at line 413 of file scsi_cd.h.

◆ RKD_TITLE_CMGS_RSVD

#define RKD_TITLE_CMGS_RSVD   0x10

Definition at line 414 of file scsi_cd.h.

◆ RKD_TITLE_CMGS_SHIFT

#define RKD_TITLE_CMGS_SHIFT   4

Definition at line 412 of file scsi_cd.h.

◆ RKD_TITLE_CP_SEC

#define RKD_TITLE_CP_SEC   0x40

Definition at line 409 of file scsi_cd.h.

◆ RKD_TITLE_CP_SEC_SHIFT

#define RKD_TITLE_CP_SEC_SHIFT   6

Definition at line 410 of file scsi_cd.h.

◆ RKD_TITLE_CPM

#define RKD_TITLE_CPM   0x80

Definition at line 407 of file scsi_cd.h.

◆ RKD_TITLE_CPM_SHIFT

#define RKD_TITLE_CPM_SHIFT   7

Definition at line 408 of file scsi_cd.h.

◆ SCSI_RCB

#define SCSI_RCB

Definition at line 702 of file scsi_cd.h.

◆ SEND_KEY

#define SEND_KEY   0xa3 /* dvd send key command */

Definition at line 363 of file scsi_cd.h.

◆ SET_CD_SPEED

#define SET_CD_SPEED   0xbb /* set c/dvd speed */

Definition at line 368 of file scsi_cd.h.

◆ SGC_F_CURRENT

#define SGC_F_CURRENT   0x01

Definition at line 86 of file scsi_cd.h.

◆ SGC_F_PERSISTENT

#define SGC_F_PERSISTENT   0x02

Definition at line 87 of file scsi_cd.h.

◆ SGC_F_VERSION_MASK

#define SGC_F_VERSION_MASK   0x2C

Definition at line 88 of file scsi_cd.h.

◆ SGC_F_VERSION_SHIFT

#define SGC_F_VERSION_SHIFT   2

Definition at line 89 of file scsi_cd.h.

◆ SGC_RT_ALL

#define SGC_RT_ALL   0x00

Definition at line 65 of file scsi_cd.h.

◆ SGC_RT_CURRENT

#define SGC_RT_CURRENT   0x01

Definition at line 66 of file scsi_cd.h.

◆ SGC_RT_MASK

#define SGC_RT_MASK   0x03

Definition at line 68 of file scsi_cd.h.

◆ SGC_RT_SPECIFIC

#define SGC_RT_SPECIFIC   0x02

Definition at line 67 of file scsi_cd.h.

◆ SGESN_NEA

#define SGESN_NEA   0x80

Definition at line 110 of file scsi_cd.h.

◆ SGESN_POLLED

#define SGESN_POLLED   1

Definition at line 98 of file scsi_cd.h.

◆ SMS_CDDVD_CAPS_PAGE

#define SMS_CDDVD_CAPS_PAGE   0x2a

Definition at line 802 of file scsi_cd.h.

◆ SRS_SUBQ

#define SRS_SUBQ   0x40

Definition at line 221 of file scsi_cd.h.

◆ SRTOC_FORMAT_ATIP

#define SRTOC_FORMAT_ATIP   0x04

Definition at line 238 of file scsi_cd.h.

◆ SRTOC_FORMAT_CD_TEXT

#define SRTOC_FORMAT_CD_TEXT   0x05

Definition at line 239 of file scsi_cd.h.

◆ SRTOC_FORMAT_LAST_ADDR

#define SRTOC_FORMAT_LAST_ADDR   0x01

Definition at line 235 of file scsi_cd.h.

◆ SRTOC_FORMAT_QSUB_PMA

#define SRTOC_FORMAT_QSUB_PMA   0x03

Definition at line 237 of file scsi_cd.h.

◆ SRTOC_FORMAT_QSUB_TOC

#define SRTOC_FORMAT_QSUB_TOC   0x02

Definition at line 236 of file scsi_cd.h.

◆ SRTOC_FORMAT_TOC

#define SRTOC_FORMAT_TOC   0x00

Definition at line 234 of file scsi_cd.h.

Function Documentation

◆ scsi_read_dvd_structure()

void scsi_read_dvd_structure ( struct ccb_scsiio csio,
u_int32_t  retries,
void(*)(struct cam_periph *, union ccb *)  cbfcnp,
u_int8_t  tag_action,
u_int32_t  address,
u_int8_t  layer_number,
u_int8_t  format,
u_int8_t  agid,
u_int8_t *  data_ptr,
u_int32_t  dxfer_len,
u_int8_t  sense_len,
u_int32_t  timeout 
)

◆ scsi_read_toc()

void scsi_read_toc ( struct ccb_scsiio csio,
uint32_t  retries,
void(*)(struct cam_periph *, union ccb *)  cbfcnp,
uint8_t  tag_action,
uint8_t  byte1_flags,
uint8_t  format,
uint8_t  track,
uint8_t *  data_ptr,
uint32_t  dxfer_len,
int  sense_len,
int  timeout 
)

Definition at line 4230 of file scsi_cd.c.

References scsi_read_toc::byte2, CAM_DIR_IN, cam_fill_csio(), cdb_t::cdb_bytes, ccb_scsiio::cdb_io, scsi_read_toc::data_len, scsi_read_toc::format, scsi_read_toc::from_track, scsi_read_toc::op_code, READ_TOC, and scsi_ulto2b().

Referenced by cdreadtoc(), and cdstart().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scsi_report_key()

__BEGIN_DECLS void scsi_report_key ( struct ccb_scsiio csio,
u_int32_t  retries,
void(*)(struct cam_periph *, union ccb *)  cbfcnp,
u_int8_t  tag_action,
u_int32_t  lba,
u_int8_t  agid,
u_int8_t  key_format,
u_int8_t *  data_ptr,
u_int32_t  dxfer_len,
u_int8_t  sense_len,
u_int32_t  timeout 
)

◆ scsi_send_key()

void scsi_send_key ( struct ccb_scsiio csio,
u_int32_t  retries,
void(*)(struct cam_periph *, union ccb *)  cbfcnp,
u_int8_t  tag_action,
u_int8_t  agid,
u_int8_t  key_format,
u_int8_t *  data_ptr,
u_int32_t  dxfer_len,
u_int8_t  sense_len,
u_int32_t  timeout 
)

Definition at line 4168 of file scsi_cd.c.

References scsi_send_key::agid_keyformat, CAM_DIR_OUT, cam_fill_csio(), cdb_t::cdb_bytes, ccb_scsiio::cdb_io, scsi_send_key::opcode, scsi_send_key::param_len, RK_KF_AGID_SHIFT, RK_KF_KEYFORMAT_MASK, scsi_ulto2b(), and SEND_KEY.

Referenced by cdsendkey().

Here is the call graph for this function:
Here is the caller graph for this function: