1 // Definitions for SCSI style command data blocks.
5 #include "types.h" // u8
7 #define CDB_CMD_READ_10 0x28
8 #define CDB_CMD_VERIFY_10 0x2f
9 #define CDB_CMD_WRITE_10 0x2a
11 struct cdb_rwdata_10 {
21 #define CDB_CMD_READ_CAPACITY 0x25
23 struct cdb_read_capacity {
30 struct cdbres_read_capacity {
35 #define CDB_CMD_TEST_UNIT_READY 0x00
36 #define CDB_CMD_INQUIRY 0x12
37 #define CDB_CMD_REQUEST_SENSE 0x03
39 struct cdb_request_sense {
48 struct cdbres_request_sense {
60 #define SCSI_TYPE_DISK 0x00
61 #define SCSI_TYPE_CDROM 0x05
63 struct cdbres_inquiry {
74 #define CDB_CMD_MODE_SENSE 0x5A
75 #define MODE_PAGE_HD_GEOMETRY 0x04
77 struct cdb_mode_sense {
87 struct cdbres_mode_sense_geom {
103 int cdb_is_read(u8 *cdbcmd, u16 blocksize);
105 int scsi_process_op(struct disk_op_s *op);
106 int scsi_is_ready(struct disk_op_s *op);
108 int scsi_drive_setup(struct drive_s *drive, const char *s, int prio);