mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 11:11:27 +00:00
GET LBA STATUS placeholder added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4348 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -249,6 +249,7 @@ static enum compl_status_e fileio_exec_write_verify(struct vdisk_cmd_params *p);
|
||||
static enum compl_status_e nullio_exec_write_verify(struct vdisk_cmd_params *p);
|
||||
static enum compl_status_e vdisk_exec_read_capacity(struct vdisk_cmd_params *p);
|
||||
static enum compl_status_e vdisk_exec_read_capacity16(struct vdisk_cmd_params *p);
|
||||
static enum compl_status_e vdisk_exec_get_lba_status(struct vdisk_cmd_params *p);
|
||||
static enum compl_status_e vdisk_exec_report_tpgs(struct vdisk_cmd_params *p);
|
||||
static enum compl_status_e vdisk_exec_inquiry(struct vdisk_cmd_params *p);
|
||||
static enum compl_status_e vdisk_exec_request_sense(struct vdisk_cmd_params *p);
|
||||
@@ -1038,6 +1039,8 @@ static enum compl_status_e vdisk_exec_srv_action_in(struct vdisk_cmd_params *p)
|
||||
case SAI_READ_CAPACITY_16:
|
||||
vdisk_exec_read_capacity16(p);
|
||||
return CMD_SUCCEEDED;
|
||||
case SAI_GET_LBA_STATUS:
|
||||
return vdisk_exec_get_lba_status(p);
|
||||
}
|
||||
return INVALID_OPCODE;
|
||||
}
|
||||
@@ -3118,6 +3121,11 @@ out:
|
||||
return CMD_SUCCEEDED;
|
||||
}
|
||||
|
||||
static enum compl_status_e vdisk_exec_get_lba_status(struct vdisk_cmd_params *p)
|
||||
{
|
||||
return INVALID_OPCODE;
|
||||
}
|
||||
|
||||
/* SPC-4 REPORT TARGET PORT GROUPS command */
|
||||
static enum compl_status_e vdisk_exec_report_tpgs(struct vdisk_cmd_params *p)
|
||||
{
|
||||
|
||||
@@ -6044,15 +6044,25 @@ static int get_cdb_info_serv_act_in(struct scst_cmd *cmd,
|
||||
|
||||
cmd->lba = 0;
|
||||
|
||||
if ((cmd->cdb[1] & 0x1f) == SAI_READ_CAPACITY_16) {
|
||||
switch (cmd->cdb[1] & 0x1f) {
|
||||
case SAI_READ_CAPACITY_16:
|
||||
cmd->op_name = "READ CAPACITY(16)";
|
||||
cmd->bufflen = get_unaligned_be32(&cmd->cdb[10]);
|
||||
cmd->op_flags |= SCST_IMPLICIT_HQ |
|
||||
SCST_REG_RESERVE_ALLOWED |
|
||||
SCST_WRITE_EXCL_ALLOWED |
|
||||
SCST_EXCL_ACCESS_ALLOWED;
|
||||
} else
|
||||
break;
|
||||
case SAI_GET_LBA_STATUS:
|
||||
cmd->op_name = "GET LBA STATUS";
|
||||
cmd->lba = get_unaligned_be64(&cmd->cdb[2]);
|
||||
cmd->bufflen = get_unaligned_be32(&cmd->cdb[10]);
|
||||
cmd->op_flags |= SCST_WRITE_EXCL_ALLOWED;
|
||||
break;
|
||||
default:
|
||||
cmd->op_flags |= SCST_UNKNOWN_LENGTH;
|
||||
break;
|
||||
}
|
||||
|
||||
cmd->data_len = cmd->bufflen;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user