nes-proj/drivers/cpu/arm/common/usb/msc/spc2_const.h

113 lines
3.7 KiB
C

/* SCSI operation codes */
/* From SPC-2 */
#define SCSI_CMD_EXTENDED_COPY 0x83
#define SCSI_CMD_INQUIRY 0x12
#define SCSI_CMD_LOG_SELECT 0x4C
#define SCSI_CMD_LOG_SENSE 0x4D
#define SCSI_CMD_MODE_SELECT_6 0x15
#define SCSI_CMD_MODE_SELECT_10 0x55
#define SCSI_CMD_MODE_SENSE_6 0x1A
#define SCSI_CMD_MODE_SENSE_10 0x5A
#define SCSI_CMD_MOVE_MEDIUM_ATTACHED 0xA7
#define SCSI_CMD_PERSISTENT_RESERVE_IN 0x5E
#define SCSI_CMD_PERSISTENT RESERVE OUT 0x5F
#define SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1E
#define SCSI_CMD_READ_BUFFER 0x3C
#define SCSI_CMD_READ_ELEMENT_STATUS_ATTACHED 0xB4
#define SCSI_CMD_RECEIVE_COPY_RESULTS 0x84
#define SCSI_CMD_RECEIVE_DIAGNOSTIC_RESULTS 0x1C
#define SCSI_CMD_RELEASE_10 0x57
#define SCSI_CMD_RELEASE_6 0x17
#define SCSI_CMD_REPORT_DEVICE_IDENTIFIER 0xA3
#define SCSI_CMD_REPORT_LUNS 0xA0
#define SCSI_CMD_REQUEST_SENSE 0x03
#define SCSI_CMD_RESERVE_10 0x56
#define SCSI_CMD_RESERVE_6 0x16
#define SCSI_CMD_SEND_DIAGNOSTIC 0x1D
#define SCSI_CMD_SET_DEVICE_IDENTIFIER 0xA4
#define SCSI_CMD_TEST_UNIT_READY 0x00
#define SCSI_CMD_WRITE_BUFFER 0x3B
/* Flag field of INQUIRY command */
#define SCSI_INQUIRY_FLAG_CMDDT 0x02
#define SCSI_INQUIRY_FLAG_EVPD 0x01
/* Constant for the standard inquiry data */
#define SCSI_STD_INQUIRY_CONNECTED 0x00
#define SCSI_STD_INQUIRY_NOT_CONNECTED 0x20
#define SCSI_STD_INQUIRY_VERSION_NONE 0x00
#define SCSI_STD_INQUIRY_VERSION_SPC2 0x04
#define SCSI_STD_INQUIRY_TYPE_DIRECT_ACCESS 0x00
#define SCSI_STD_INQUIRY_TYPE_SEQUENTIAL 0x01
#define SCSI_STD_INQUIRY_TYPE_PRINTER 0x02
#define SCSI_STD_INQUIRY_TYPE_PROCESSOR 0x03
#define SCSI_STD_INQUIRY_TYPE_WRITE_ONCE 0x04
#define SCSI_STD_INQUIRY_TYPE_CD_ROM 0x05
#define SCSI_STD_INQUIRY_TYPE_SCANNER 0x06
#define SCSI_STD_INQUIRY_TYPE_OPTICAL 0x07
#define SCSI_STD_INQUIRY_TYPE_CHANGER 0x08
#define SCSI_STD_INQUIRY_TYPE_COMM 0x09
#define SCSI_STD_INQUIRY_TYPE_RAID 0x0C
#define SCSI_STD_INQUIRY_TYPE_RBC 0x0E
#define SCSI_STD_INQUIRY_FLAG1_RMB 0x80
#define SCSI_STD_INQUIRY_FLAG2_AERC 0x80
#define SCSI_STD_INQUIRY_FLAG2_NORMACA 0x20
#define SCSI_STD_INQUIRY_FLAG2_HISUP 0x10
#define SCSI_STD_INQUIRY_FLAG2_RESPONSE_FORMAT 0x02
#define SCSI_STD_INQUIRY_FLAG3_SCCS 0x80
#define SCSI_STD_INQUIRY_FLAG4_BQUE 0x80
#define SCSI_STD_INQUIRY_FLAG4_ENCSERV 0x40
#define SCSI_STD_INQUIRY_FLAG4_VS 0x20
#define SCSI_STD_INQUIRY_FLAG4_MULTIP 0x10
#define SCSI_STD_INQUIRY_FLAG4_MCHNGR 0x08
#define SCSI_STD_INQUIRY_FLAG4_ADDR16 0x01
#define SCSI_STD_INQUIRY_FLAG5_RELADR 0x80
#define SCSI_STD_INQUIRY_FLAG5_WBUS 0x20
#define SCSI_STD_INQUIRY_FLAG5_SYNC 0x10
#define SCSI_STD_INQUIRY_FLAG5_LINKED 0x08
#define SCSI_STD_INQUIRY_FLAG5_CMDQUE 0x02
#define SCSI_SENSE_CURRENT_ERROR 0x70
#define SCSI_SENSE_DEFERRED_ERROR 0x71
#define SCSI_SENSE_INFORMATION_VALID 0x80
#define SCSI_SENSE_FILEMARK 0x80
#define SCSI_SENSE_EOM 0x40
#define SCSI_SENSE_ILI 0x20
#define SCSI_PAGE_DEVICE_IDENTIFICATION 0x83
#define SCSI_PAGE_SUPPORTED_PAGES 0x00
#define SCSI_PAGE_UNIT_SERIAL_NUMBER 0x80
#define SCSI_CODE_SET_BINARY 0x01
#define SCSI_CODE_SET_ACSII 0x02
#define SCSI_ASSOCIATION_DEVICE 0x00
#define SCSI_ASSOCIATION_PORT 0x10
#define SCSI_IDENTIFIER_TYPE_NON_UNIQUE 0x00
#define SCSI_IDENTIFIER_TYPE_VENDORID 0x01
#define SCSI_IDENTIFIER_TYPE_EUI_64 0x02
#define SCSI_IDENTIFIER_TYPE_FC_FS 0x03
#define SCSI_IDENTIFIER_TYPE_PORT 0x04
/* Mode parameters */
#define SCSI_MODE_PAGE_SP 0x80
#define SCSI_MODE_SELECT_PF 0x10
#define SCSI_MODE_SELECT_SP 0x01
#define SCSI_MODE_SENSE_DBD 0x08
#define SCSI_MODE_SENSE_PAGE_CODE_MASK 0x3f
#define SCSI_MODE_SENSE_PC_CURRENT 0x00
#define SCSI_MODE_SENSE_PC_CHANGEABLE 0x40
#define SCSI_MODE_SENSE_PC_DEFAULT 0x80
#define SCSI_MODE_SENSE_PC_SAVED 0xc0
#define SCSI_MODE_SENSE_ALL_PAGES 0x3f