Linux Kernel
3.7.1
|
Go to the source code of this file.
Macros | |
#define | MS_SP_CMND 0xFA |
#define | MS_FORMAT 0xA0 |
#define | GET_MS_INFORMATION 0xB0 |
#define | VENDOR_CMND 0xF0 |
#define | READ_STATUS 0x09 |
#define | READ_EEPROM 0x04 |
#define | WRITE_EEPROM 0x05 |
#define | READ_MEM 0x0D |
#define | WRITE_MEM 0x0E |
#define | GET_BUS_WIDTH 0x13 |
#define | GET_SD_CSD 0x14 |
#define | TOGGLE_GPIO 0x15 |
#define | TRACE_MSG 0x18 |
#define | SCSI_APP_CMD 0x10 |
#define | PP_READ10 0x1A |
#define | PP_WRITE10 0x0A |
#define | READ_HOST_REG 0x1D |
#define | WRITE_HOST_REG 0x0D |
#define | SET_VAR 0x05 |
#define | GET_VAR 0x15 |
#define | DMA_READ 0x16 |
#define | DMA_WRITE 0x06 |
#define | GET_DEV_STATUS 0x10 |
#define | SET_CHIP_MODE 0x27 |
#define | SUIT_CMD 0xE0 |
#define | WRITE_PHY 0x07 |
#define | READ_PHY 0x17 |
#define | WRITE_EEPROM2 0x03 |
#define | READ_EEPROM2 0x13 |
#define | ERASE_EEPROM2 0x23 |
#define | WRITE_EFUSE 0x04 |
#define | READ_EFUSE 0x14 |
#define | WRITE_CFG 0x0E |
#define | READ_CFG 0x1E |
#define | SPI_VENDOR_COMMAND 0x1C |
#define | SCSI_SPI_GETSTATUS 0x00 |
#define | SCSI_SPI_SETPARAMETER 0x01 |
#define | SCSI_SPI_READFALSHID 0x02 |
#define | SCSI_SPI_READFLASH 0x03 |
#define | SCSI_SPI_WRITEFLASH 0x04 |
#define | SCSI_SPI_WRITEFLASHSTATUS 0x05 |
#define | SCSI_SPI_ERASEFLASH 0x06 |
#define | INIT_BATCHCMD 0x41 |
#define | ADD_BATCHCMD 0x42 |
#define | SEND_BATCHCMD 0x43 |
#define | GET_BATCHRSP 0x44 |
#define | CHIP_NORMALMODE 0x00 |
#define | CHIP_DEBUGMODE 0x01 |
#define | SD_PASS_THRU_MODE 0xD0 |
#define | SD_EXECUTE_NO_DATA 0xD1 |
#define | SD_EXECUTE_READ 0xD2 |
#define | SD_EXECUTE_WRITE 0xD3 |
#define | SD_GET_RSP 0xD4 |
#define | SD_HW_RST 0xD6 |
#define | CMD_MSPRO_MG_RKEY 0xA4 /* Report Key Command */ |
#define | CMD_MSPRO_MG_SKEY 0xA3 /* Send Key Command */ |
#define | KC_MG_R_PRO 0xBE /* MG-R PRO*/ |
#define | KF_SET_LEAF_ID 0x31 /* Set Leaf ID */ |
#define | KF_GET_LOC_EKB 0x32 /* Get Local EKB */ |
#define | KF_CHG_HOST 0x33 /* Challenge (host) */ |
#define | KF_RSP_CHG 0x34 /* Response and Challenge (device) */ |
#define | KF_RSP_HOST 0x35 /* Response (host) */ |
#define | KF_GET_ICV 0x36 /* Get ICV */ |
#define | KF_SET_ICV 0x37 /* SSet ICV */ |
#define | SENSE_TYPE_NO_SENSE 0 |
#define | SENSE_TYPE_MEDIA_CHANGE 1 |
#define | SENSE_TYPE_MEDIA_NOT_PRESENT 2 |
#define | SENSE_TYPE_MEDIA_LBA_OVER_RANGE 3 |
#define | SENSE_TYPE_MEDIA_LUN_NOT_SUPPORT 4 |
#define | SENSE_TYPE_MEDIA_WRITE_PROTECT 5 |
#define | SENSE_TYPE_MEDIA_INVALID_CMD_FIELD 6 |
#define | SENSE_TYPE_MEDIA_UNRECOVER_READ_ERR 7 |
#define | SENSE_TYPE_MEDIA_WRITE_ERR 8 |
#define | SENSE_TYPE_FORMAT_IN_PROGRESS 9 |
#define | SENSE_TYPE_FORMAT_CMD_FAILED 10 |
#define | SENSE_TYPE_MG_KEY_FAIL_NOT_ESTAB 0x0b |
#define | SENSE_TYPE_MG_KEY_FAIL_NOT_AUTHEN 0x0c |
#define | SENSE_TYPE_MG_INCOMPATIBLE_MEDIUM 0x0d |
#define | SENSE_TYPE_MG_WRITE_ERR 0x0e |
#define | SENSE_TYPE_MEDIA_READ_FORBIDDEN 0x10 /* FOR Locked SD card*/ |
Functions | |
void | scsi_show_command (struct scsi_cmnd *srb) |
void | set_sense_type (struct rtsx_chip *chip, unsigned int lun, int sense_type) |
void | set_sense_data (struct rtsx_chip *chip, unsigned int lun, u8 err_code, u8 sense_key, u32 info, u8 asc, u8 ascq, u8 sns_key_info0, u16 sns_key_info1) |
int | rtsx_scsi_handler (struct scsi_cmnd *srb, struct rtsx_chip *chip) |
#define ADD_BATCHCMD 0x42 |
Definition at line 81 of file rtsx_scsi.h.
#define CHIP_DEBUGMODE 0x01 |
Definition at line 86 of file rtsx_scsi.h.
#define CHIP_NORMALMODE 0x00 |
Definition at line 85 of file rtsx_scsi.h.
#define CMD_MSPRO_MG_RKEY 0xA4 /* Report Key Command */ |
Definition at line 97 of file rtsx_scsi.h.
#define CMD_MSPRO_MG_SKEY 0xA3 /* Send Key Command */ |
Definition at line 98 of file rtsx_scsi.h.
#define DMA_READ 0x16 |
Definition at line 55 of file rtsx_scsi.h.
#define DMA_WRITE 0x06 |
Definition at line 56 of file rtsx_scsi.h.
#define ERASE_EEPROM2 0x23 |
Definition at line 64 of file rtsx_scsi.h.
#define GET_BATCHRSP 0x44 |
Definition at line 83 of file rtsx_scsi.h.
#define GET_BUS_WIDTH 0x13 |
Definition at line 42 of file rtsx_scsi.h.
#define GET_DEV_STATUS 0x10 |
Definition at line 57 of file rtsx_scsi.h.
#define GET_MS_INFORMATION 0xB0 |
Definition at line 32 of file rtsx_scsi.h.
#define GET_SD_CSD 0x14 |
Definition at line 43 of file rtsx_scsi.h.
#define GET_VAR 0x15 |
Definition at line 54 of file rtsx_scsi.h.
#define INIT_BATCHCMD 0x41 |
Definition at line 80 of file rtsx_scsi.h.
#define KC_MG_R_PRO 0xBE /* MG-R PRO*/ |
Definition at line 101 of file rtsx_scsi.h.
#define KF_CHG_HOST 0x33 /* Challenge (host) */ |
Definition at line 106 of file rtsx_scsi.h.
#define KF_GET_ICV 0x36 /* Get ICV */ |
Definition at line 109 of file rtsx_scsi.h.
#define KF_GET_LOC_EKB 0x32 /* Get Local EKB */ |
Definition at line 105 of file rtsx_scsi.h.
#define KF_RSP_CHG 0x34 /* Response and Challenge (device) */ |
Definition at line 107 of file rtsx_scsi.h.
#define KF_RSP_HOST 0x35 /* Response (host) */ |
Definition at line 108 of file rtsx_scsi.h.
#define KF_SET_ICV 0x37 /* SSet ICV */ |
Definition at line 110 of file rtsx_scsi.h.
#define KF_SET_LEAF_ID 0x31 /* Set Leaf ID */ |
Definition at line 104 of file rtsx_scsi.h.
#define MS_FORMAT 0xA0 |
Definition at line 31 of file rtsx_scsi.h.
#define MS_SP_CMND 0xFA |
Definition at line 30 of file rtsx_scsi.h.
#define PP_READ10 0x1A |
Definition at line 49 of file rtsx_scsi.h.
#define PP_WRITE10 0x0A |
Definition at line 50 of file rtsx_scsi.h.
#define READ_CFG 0x1E |
Definition at line 68 of file rtsx_scsi.h.
#define READ_EEPROM 0x04 |
Definition at line 38 of file rtsx_scsi.h.
#define READ_EEPROM2 0x13 |
Definition at line 63 of file rtsx_scsi.h.
#define READ_EFUSE 0x14 |
Definition at line 66 of file rtsx_scsi.h.
#define READ_HOST_REG 0x1D |
Definition at line 51 of file rtsx_scsi.h.
#define READ_MEM 0x0D |
Definition at line 40 of file rtsx_scsi.h.
#define READ_PHY 0x17 |
Definition at line 61 of file rtsx_scsi.h.
#define READ_STATUS 0x09 |
Definition at line 36 of file rtsx_scsi.h.
#define SCSI_APP_CMD 0x10 |
Definition at line 47 of file rtsx_scsi.h.
#define SCSI_SPI_ERASEFLASH 0x06 |
Definition at line 78 of file rtsx_scsi.h.
#define SCSI_SPI_GETSTATUS 0x00 |
Definition at line 72 of file rtsx_scsi.h.
#define SCSI_SPI_READFALSHID 0x02 |
Definition at line 74 of file rtsx_scsi.h.
#define SCSI_SPI_READFLASH 0x03 |
Definition at line 75 of file rtsx_scsi.h.
#define SCSI_SPI_SETPARAMETER 0x01 |
Definition at line 73 of file rtsx_scsi.h.
#define SCSI_SPI_WRITEFLASH 0x04 |
Definition at line 76 of file rtsx_scsi.h.
#define SCSI_SPI_WRITEFLASHSTATUS 0x05 |
Definition at line 77 of file rtsx_scsi.h.
#define SD_EXECUTE_NO_DATA 0xD1 |
Definition at line 90 of file rtsx_scsi.h.
#define SD_EXECUTE_READ 0xD2 |
Definition at line 91 of file rtsx_scsi.h.
#define SD_EXECUTE_WRITE 0xD3 |
Definition at line 92 of file rtsx_scsi.h.
#define SD_GET_RSP 0xD4 |
Definition at line 93 of file rtsx_scsi.h.
#define SD_HW_RST 0xD6 |
Definition at line 94 of file rtsx_scsi.h.
#define SD_PASS_THRU_MODE 0xD0 |
Definition at line 89 of file rtsx_scsi.h.
#define SEND_BATCHCMD 0x43 |
Definition at line 82 of file rtsx_scsi.h.
#define SENSE_TYPE_FORMAT_CMD_FAILED 10 |
Definition at line 124 of file rtsx_scsi.h.
#define SENSE_TYPE_FORMAT_IN_PROGRESS 9 |
Definition at line 123 of file rtsx_scsi.h.
#define SENSE_TYPE_MEDIA_CHANGE 1 |
Definition at line 115 of file rtsx_scsi.h.
#define SENSE_TYPE_MEDIA_INVALID_CMD_FIELD 6 |
Definition at line 120 of file rtsx_scsi.h.
#define SENSE_TYPE_MEDIA_LBA_OVER_RANGE 3 |
Definition at line 117 of file rtsx_scsi.h.
#define SENSE_TYPE_MEDIA_LUN_NOT_SUPPORT 4 |
Definition at line 118 of file rtsx_scsi.h.
#define SENSE_TYPE_MEDIA_NOT_PRESENT 2 |
Definition at line 116 of file rtsx_scsi.h.
#define SENSE_TYPE_MEDIA_READ_FORBIDDEN 0x10 /* FOR Locked SD card*/ |
Definition at line 132 of file rtsx_scsi.h.
#define SENSE_TYPE_MEDIA_UNRECOVER_READ_ERR 7 |
Definition at line 121 of file rtsx_scsi.h.
#define SENSE_TYPE_MEDIA_WRITE_ERR 8 |
Definition at line 122 of file rtsx_scsi.h.
#define SENSE_TYPE_MEDIA_WRITE_PROTECT 5 |
Definition at line 119 of file rtsx_scsi.h.
#define SENSE_TYPE_MG_INCOMPATIBLE_MEDIUM 0x0d |
Definition at line 128 of file rtsx_scsi.h.
#define SENSE_TYPE_MG_KEY_FAIL_NOT_AUTHEN 0x0c |
Definition at line 127 of file rtsx_scsi.h.
#define SENSE_TYPE_MG_KEY_FAIL_NOT_ESTAB 0x0b |
Definition at line 126 of file rtsx_scsi.h.
#define SENSE_TYPE_MG_WRITE_ERR 0x0e |
Definition at line 129 of file rtsx_scsi.h.
#define SENSE_TYPE_NO_SENSE 0 |
Definition at line 114 of file rtsx_scsi.h.
#define SET_CHIP_MODE 0x27 |
Definition at line 58 of file rtsx_scsi.h.
#define SET_VAR 0x05 |
Definition at line 53 of file rtsx_scsi.h.
#define SPI_VENDOR_COMMAND 0x1C |
Definition at line 70 of file rtsx_scsi.h.
#define SUIT_CMD 0xE0 |
Definition at line 59 of file rtsx_scsi.h.
#define TOGGLE_GPIO 0x15 |
Definition at line 44 of file rtsx_scsi.h.
#define TRACE_MSG 0x18 |
Definition at line 45 of file rtsx_scsi.h.
#define VENDOR_CMND 0xF0 |
Definition at line 34 of file rtsx_scsi.h.
#define WRITE_CFG 0x0E |
Definition at line 67 of file rtsx_scsi.h.
#define WRITE_EEPROM 0x05 |
Definition at line 39 of file rtsx_scsi.h.
#define WRITE_EEPROM2 0x03 |
Definition at line 62 of file rtsx_scsi.h.
#define WRITE_EFUSE 0x04 |
Definition at line 65 of file rtsx_scsi.h.
#define WRITE_HOST_REG 0x0D |
Definition at line 52 of file rtsx_scsi.h.
#define WRITE_MEM 0x0E |
Definition at line 41 of file rtsx_scsi.h.
#define WRITE_PHY 0x07 |
Definition at line 60 of file rtsx_scsi.h.
Definition at line 3016 of file rtsx_scsi.c.
Definition at line 47 of file rts51x_scsi.c.
void set_sense_data | ( | struct rtsx_chip * | chip, |
unsigned int | lun, | ||
u8 | err_code, | ||
u8 | sense_key, | ||
u32 | info, | ||
u8 | asc, | ||
u8 | ascq, | ||
u8 | sns_key_info0, | ||
u16 | sns_key_info1 | ||
) |
Definition at line 224 of file rtsx_scsi.c.