Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322138
b: refs/heads/master
c: 74f4cf2
h: refs/heads/master
v: v3
  • Loading branch information
Nicholas Bellinger committed Aug 18, 2012
1 parent 881fb58 commit 9113e22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d2a2cd95ee0137a2353d1b5635739c281f27cd4
refs/heads/master: 74f4cf290918f05b6489aa732dfb08aa5606b9d6
9 changes: 6 additions & 3 deletions trunk/drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -2323,9 +2323,12 @@ int transport_generic_new_cmd(struct se_cmd *cmd)
if (ret < 0)
goto out_fail;
}

/* Workaround for handling zero-length control CDBs */
if (!(cmd->se_cmd_flags & SCF_SCSI_DATA_CDB) && !cmd->data_length) {
/*
* If this command doesn't have any payload and we don't have to call
* into the fabric for data transfers, go ahead and complete it right
* away.
*/
if (!cmd->data_length) {
spin_lock_irq(&cmd->t_state_lock);
cmd->t_state = TRANSPORT_COMPLETE;
cmd->transport_state |= CMD_T_ACTIVE;
Expand Down

0 comments on commit 9113e22

Please sign in to comment.