static int pscsi_parse_cdb(struct se_cmd *cmd)
{
unsigned char *cdb = cmd->t_task_cdb;
- unsigned int dummy_size;
- int ret;
if (cmd->se_cmd_flags & SCF_BIDI) {
cmd->se_cmd_flags |= SCF_SCSI_CDB_EXCEPTION;
*/
switch (cdb[0]) {
case REPORT_LUNS:
- ret = spc_parse_cdb(cmd, &dummy_size);
- if (ret)
- return ret;
- break;
+ return spc_emulate_report_luns(cmd);
case READ_6:
case READ_10:
case READ_12:
/* FALLTHROUGH*/
default:
cmd->execute_cmd = pscsi_execute_cmd;
- break;
+ return 0;
}
-
- return 0;
}
static int pscsi_execute_cmd(struct se_cmd *cmd)
return 0;
}
-static int spc_emulate_report_luns(struct se_cmd *cmd)
+int spc_emulate_report_luns(struct se_cmd *cmd)
{
struct se_dev_entry *deve;
struct se_session *sess = cmd->se_sess;
target_complete_cmd(cmd, GOOD);
return 0;
}
+EXPORT_SYMBOL(spc_emulate_report_luns);
static int spc_emulate_testunitready(struct se_cmd *cmd)
{
int sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops);
int spc_parse_cdb(struct se_cmd *cmd, unsigned int *size);
+int spc_emulate_report_luns(struct se_cmd *cmd);
int spc_get_write_same_sectors(struct se_cmd *cmd);
void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *);