18#define RT_SCSI_LUN_SHIFT 5
46#define RT_SCSI_DEVTYPE_MASK 31
48#define RT_SCSI_REMOVABLE_BIT 7
198#define RT_SCSI_UNMAP_SHIFT 3
220#define RT_SCSI_PF_SHIFT 4
221#define RT_SCSI_RTD_SHIFT 1
222#define RT_SCSI_SP_SHIFT 0
252#define RT_SCSI_DBD_SHIFT 3
253#define RT_SCSI_LLBAA_SHIFT 4
254#define RT_SCSI_PC_SHIFT 6
255#define RT_SCSI_PAGE_CODE_SHIFT 0
278#define RT_SCSI_CMD_TEST_UNIT_READY 0x00
279#define RT_SCSI_CMD_REQUEST_SENSE 0x03
280#define RT_SCSI_CMD_INQUIRY 0x12
281#define RT_SCSI_CMD_MODE_SELECT 0x15
282#define RT_SCSI_CMD_MODE_SENSE 0x1a
283#define RT_SCSI_CMD_READ_CAPACITY10 0x25
284#define RT_SCSI_CMD_READ10 0x28
285#define RT_SCSI_CMD_WRITE10 0x2a
286#define RT_SCSI_CMD_SYNCHRONIZE_CACHE10 0x35
287#define RT_SCSI_CMD_WRITE_SAME10 0x41
288#define RT_SCSI_CMD_MODE_SELECT10 0x55
289#define RT_SCSI_CMD_MODE_SENSE10 0x5a
290#define RT_SCSI_CMD_READ16 0x88
291#define RT_SCSI_CMD_WRITE16 0x8a
292#define RT_SCSI_CMD_SYNCHRONIZE_CACHE16 0x91
293#define RT_SCSI_CMD_WRITE_SAME16 0x93
294#define RT_SCSI_CMD_READ_CAPACITY16 0x9e
295#define RT_SCSI_CMD_READ12 0xa8
296#define RT_SCSI_CMD_WRITE12 0xaa
412 struct rt_scsi_request_sense_data *out_data);
416 struct rt_scsi_inquiry_data *out_data);
419 struct rt_scsi_read_capacity10_data *out_data);
421 struct rt_scsi_read_capacity16_data *out_data);
rt_uint64_t __bitwise rt_be64_t
rt_uint16_t __bitwise rt_be16_t
rt_uint32_t __bitwise rt_be32_t
unsigned short rt_uint16_t
struct rt_list_node rt_list_t
rt_err_t rt_scsi_write16(struct rt_scsi_device *sdev, rt_off_t lba, const void *buffer, rt_size_t size)
#define RT_SCSI_CMD_WRITE10
rt_inline rt_bool_t rt_scsi_cmd_is_write(struct rt_scsi_cmd *cmd)
rt_err_t rt_scsi_host_register(struct rt_scsi_host *scsi)
rt_err_t rt_scsi_synchronize_cache10(struct rt_scsi_device *sdev, rt_off_t lba, rt_size_t size)
@ SCSI_DEVICE_TYPE_PRINTER
@ SCSI_DEVICE_TYPE_COMMUNICATION
@ SCSI_DEVICE_TYPE_SCANNER
@ SCSI_DEVICE_TYPE_BRIDGE
@ SCSI_DEVICE_TYPE_ASC_PREPRESS_GRAPHICS11
@ SCSI_DEVICE_TYPE_PROCESSOR
@ SCSI_DEVICE_TYPE_ENCLOSURE
@ SCSI_DEVICE_TYPE_CARDREADER
@ SCSI_DEVICE_TYPE_OPTICAL
@ SCSI_DEVICE_TYPE_SEQUENTIAL
@ SCSI_DEVICE_TYPE_MEDIUM_CHANGER
@ SCSI_DEVICE_TYPE_WRITE_ONCE_READ_MULTIPLE
@ SCSI_DEVICE_TYPE_DIRECT
@ SCSI_DEVICE_TYPE_ASC_PREPRESS_GRAPHICS10
rt_err_t rt_scsi_read_capacity16(struct rt_scsi_device *sdev, struct rt_scsi_read_capacity16_data *out_data)
#define RT_SCSI_CMD_WRITE16
rt_err_t rt_scsi_synchronize_cache16(struct rt_scsi_device *sdev, rt_off_t lba, rt_size_t size)
rt_err_t rt_scsi_read10(struct rt_scsi_device *sdev, rt_off_t lba, void *buffer, rt_size_t size)
rt_err_t rt_scsi_test_unit_ready(struct rt_scsi_device *sdev)
rt_err_t rt_scsi_inquiry(struct rt_scsi_device *sdev, struct rt_scsi_inquiry_data *out_data)
rt_err_t rt_scsi_mode_select6(struct rt_scsi_device *sdev, rt_uint8_t pf, rt_uint8_t sp, void *buffer, rt_size_t size, struct rt_scsi_mode_select_data *data)
rt_err_t rt_scsi_request_sense(struct rt_scsi_device *sdev, struct rt_scsi_request_sense_data *out_data)
rt_err_t rt_scsi_write_same16(struct rt_scsi_device *sdev, rt_off_t lba, rt_size_t size)
rt_err_t rt_scsi_write_same10(struct rt_scsi_device *sdev, rt_off_t lba, rt_size_t size)
rt_packed(struct rt_scsi_unknow { rt_uint8_t opcode;})
rt_err_t rt_scsi_read12(struct rt_scsi_device *sdev, rt_off_t lba, void *buffer, rt_size_t size)
#define RT_SCSI_CMD_WRITE12
rt_err_t rt_scsi_read16(struct rt_scsi_device *sdev, rt_off_t lba, void *buffer, rt_size_t size)
rt_err_t rt_scsi_read_capacity10(struct rt_scsi_device *sdev, struct rt_scsi_read_capacity10_data *out_data)
rt_err_t rt_scsi_write12(struct rt_scsi_device *sdev, rt_off_t lba, const void *buffer, rt_size_t size)
rt_err_t rt_scsi_write10(struct rt_scsi_device *sdev, rt_off_t lba, const void *buffer, rt_size_t size)
rt_err_t rt_scsi_mode_sense10(struct rt_scsi_device *sdev, rt_uint8_t dbd, rt_uint8_t modepage, rt_uint8_t subpage, void *buffer, rt_size_t size, struct rt_scsi_mode_select_data *data)
rt_err_t rt_scsi_host_unregister(struct rt_scsi_host *scsi)
rt_err_t rt_scsi_mode_sense6(struct rt_scsi_device *sdev, rt_uint8_t dbd, rt_uint8_t modepage, rt_uint8_t subpage, void *buffer, rt_size_t size, struct rt_scsi_mode_select_data *data)
rt_err_t rt_scsi_mode_select10(struct rt_scsi_device *sdev, rt_uint8_t pf, rt_uint8_t sp, void *buffer, rt_size_t size, struct rt_scsi_mode_select_data *data)
struct rt_scsi_synchronize_cache16 synchronize_cache16
struct rt_scsi_write_same10 write_same10
struct rt_scsi_mode_select6 mode_select6
struct rt_scsi_request_sense request_sense
struct rt_scsi_mode_sense6 mode_sense6
struct rt_scsi_read16 read16
struct rt_scsi_synchronize_cache10 synchronize_cache10
struct rt_scsi_inquiry inquiry
struct rt_scsi_read_capacity10 read_capacity10
struct rt_scsi_read_capacity16 read_capacity16
struct rt_scsi_unknow unknow
struct rt_scsi_write10 write10
struct rt_scsi_mode_sense10 mode_sense10
union rt_scsi_cmd::@127112164346047252131150363270265367232301355316 data
struct rt_scsi_write12 write12
struct rt_scsi_write_same16 write_same16
union rt_scsi_cmd::@110335064260203175325264173125227050061241262006 op
struct rt_scsi_read12 read12
struct rt_scsi_test_unit_ready test_unit_ready
struct rt_scsi_mode_select10 mode_select10
struct rt_scsi_read10 read10
struct rt_scsi_write16 write16
struct rt_scsi_host * host
const struct rt_scsi_ops * ops
rt_uint8_t device_specific
rt_uint16_t block_descriptor_length
rt_err_t(* transfer)(struct rt_scsi_device *sdev, struct rt_scsi_cmd *cmd)
rt_err_t(* reset)(struct rt_scsi_device *sdev)