mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
Fixes broken REQUEST SENSE
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@410 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -906,7 +906,7 @@ struct scst_cmd *scst_create_prepare_internal_cmd(
|
||||
|
||||
res->cmd_lists = orig_cmd->cmd_lists;
|
||||
res->sess = orig_cmd->sess;
|
||||
res->state = SCST_CMD_STATE_DEV_PARSE;
|
||||
res->state = SCST_CMD_STATE_PRE_PARSE;
|
||||
res->atomic = scst_cmd_atomic(orig_cmd);
|
||||
res->internal = 1;
|
||||
res->tgtt = orig_cmd->tgtt;
|
||||
|
||||
@@ -2177,15 +2177,18 @@ static int scst_check_auto_sense(struct scst_cmd *cmd)
|
||||
return res;
|
||||
}
|
||||
|
||||
static int scst_done_cmd_check(struct scst_cmd *cmd, int *pres)
|
||||
static int scst_done_cmd_check(struct scst_cmd **pcmd, int *pres)
|
||||
{
|
||||
int res = 0, rc;
|
||||
struct scst_cmd *cmd = *pcmd;
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
if (unlikely(cmd->cdb[0] == REQUEST_SENSE)) {
|
||||
if (cmd->internal)
|
||||
if (cmd->internal) {
|
||||
cmd = scst_complete_request_sense(cmd);
|
||||
*pcmd = cmd;
|
||||
}
|
||||
} else if (unlikely(scst_check_auto_sense(cmd))) {
|
||||
PRINT_INFO("Command finished with CHECK CONDITION, but "
|
||||
"without sense data (opcode 0x%x), issuing "
|
||||
@@ -2323,7 +2326,7 @@ static int scst_pre_dev_done(struct scst_cmd *cmd)
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
rc = scst_done_cmd_check(cmd, &res);
|
||||
rc = scst_done_cmd_check(&cmd, &res);
|
||||
if (rc)
|
||||
goto out;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user