Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256889
b: refs/heads/master
c: 695434e
h: refs/heads/master
i:
  256887: c539837
v: v3
  • Loading branch information
Nicholas Bellinger committed Jul 22, 2011
1 parent 22d4aac commit 2ca405b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35462975b2b197b990fedbb74b81f9bea9d344cb
refs/heads/master: 695434e1cbd57f404110bf4ab187a5127ffd79bb
24 changes: 24 additions & 0 deletions trunk/drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1842,11 +1842,35 @@ int transport_generic_handle_cdb(
printk(KERN_ERR "cmd->se_lun is NULL\n");
return -EINVAL;
}

transport_add_cmd_to_queue(cmd, TRANSPORT_NEW_CMD);
return 0;
}
EXPORT_SYMBOL(transport_generic_handle_cdb);

/*
* Used by fabric module frontends to queue tasks directly.
* Many only be used from process context only
*/
int transport_handle_cdb_direct(
struct se_cmd *cmd)
{
if (!cmd->se_lun) {
dump_stack();
printk(KERN_ERR "cmd->se_lun is NULL\n");
return -EINVAL;
}
if (in_interrupt()) {
dump_stack();
printk(KERN_ERR "transport_generic_handle_cdb cannot be called"
" from interrupt context\n");
return -EINVAL;
}

return transport_generic_new_cmd(cmd);
}
EXPORT_SYMBOL(transport_handle_cdb_direct);

/*
* Used by fabric module frontends defining a TFO->new_cmd_map() caller
* to queue up a newly setup se_cmd w/ TRANSPORT_NEW_CMD_MAP in order to
Expand Down
1 change: 1 addition & 0 deletions trunk/include/target/target_core_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ extern void transport_init_se_cmd(struct se_cmd *,
extern void transport_free_se_cmd(struct se_cmd *);
extern int transport_generic_allocate_tasks(struct se_cmd *, unsigned char *);
extern int transport_generic_handle_cdb(struct se_cmd *);
extern int transport_handle_cdb_direct(struct se_cmd *);
extern int transport_generic_handle_cdb_map(struct se_cmd *);
extern int transport_generic_handle_data(struct se_cmd *);
extern void transport_new_cmd_failure(struct se_cmd *);
Expand Down

0 comments on commit 2ca405b

Please sign in to comment.