mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 11:11:27 +00:00
Merge of the trunk's r3248:
Fix problem with handling internal commands reported by Hiroyuki Sato <hiroysato@gmail.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@3249 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1979,6 +1979,7 @@ int scst_set_cmd_abnormal_done_state(struct scst_cmd *cmd)
|
||||
case SCST_CMD_STATE_PRE_DEV_DONE:
|
||||
case SCST_CMD_STATE_MODE_SELECT_CHECKS:
|
||||
case SCST_CMD_STATE_PRE_XMIT_RESP:
|
||||
case SCST_CMD_STATE_FINISHED_INTERNAL:
|
||||
break;
|
||||
default:
|
||||
PRINT_CRIT_ERROR("Wrong cmd state %d (cmd %p, op %x)",
|
||||
@@ -3690,6 +3691,7 @@ static struct scst_cmd *scst_create_prepare_internal_cmd(
|
||||
struct scst_cmd *orig_cmd, int bufsize)
|
||||
{
|
||||
struct scst_cmd *res;
|
||||
int rc;
|
||||
gfp_t gfp_mask = scst_cmd_atomic(orig_cmd) ? GFP_ATOMIC : GFP_KERNEL;
|
||||
|
||||
TRACE_ENTRY();
|
||||
@@ -3716,6 +3718,9 @@ static struct scst_cmd *scst_create_prepare_internal_cmd(
|
||||
if (res->tgt_dev != NULL)
|
||||
__scst_get();
|
||||
|
||||
rc = scst_pre_parse(res);
|
||||
sBUG_ON(rc != 0);
|
||||
|
||||
res->state = SCST_CMD_STATE_PARSE;
|
||||
|
||||
out:
|
||||
|
||||
@@ -302,6 +302,8 @@ void scst_unblock_deferred(struct scst_tgt_dev *tgt_dev,
|
||||
void scst_on_hq_cmd_response(struct scst_cmd *cmd);
|
||||
void scst_xmit_process_aborted_cmd(struct scst_cmd *cmd);
|
||||
|
||||
int scst_pre_parse(struct scst_cmd *cmd);
|
||||
|
||||
int scst_cmd_thread(void *arg);
|
||||
void scst_cmd_tasklet(long p);
|
||||
int scst_init_thread(void *arg);
|
||||
|
||||
@@ -419,7 +419,7 @@ out:
|
||||
}
|
||||
EXPORT_SYMBOL(scst_cmd_init_done);
|
||||
|
||||
static int scst_pre_parse(struct scst_cmd *cmd)
|
||||
int scst_pre_parse(struct scst_cmd *cmd)
|
||||
{
|
||||
int res;
|
||||
struct scst_device *dev = cmd->dev;
|
||||
|
||||
Reference in New Issue
Block a user