SCSI: Add struct for READ (16) and WRITE (16) commands

Based on a SCSI Command Reference Manual by Seagate and Wikipedia.

Tested against OpenSolaris iSCSI target on ppc. It choked on the READ (12) opcode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38425 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Andreas Färber 2010-08-29 13:03:05 +00:00
parent 9b46a2b25d
commit 3e9b601da1

View File

@ -388,6 +388,29 @@ typedef struct scsi_cmd_rw_12 {
} _PACKED scsi_cmd_rw_12;
// READ (16), WRITE (16)
typedef struct scsi_cmd_rw_16 {
uint8 opcode;
LBITFIELD8_6(
_res1_0 : 1,
force_unit_access_non_volatile : 1,
_res1_2 : 1,
force_unit_access : 1,
disable_page_out : 1,
read_protect : 3
);
uint64 lba; // big endian
uint32 length;
LBITFIELD8_3(
group_number : 5,
_res_14_5 : 2,
_res_14_7 : 1
);
uint8 control;
} _PACKED scsi_cmd_rw_16;
// REQUEST SENSE
typedef struct scsi_cmd_request_sense {