Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263297
b: refs/heads/master
c: 01cde4d
h: refs/heads/master
i:
  263295: fbdf2da
v: v3
  • Loading branch information
Nicholas Bellinger committed Aug 22, 2011
1 parent 699d0fb commit bb523f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: 7abbe7f3e4243e28a9169ee1b8d76f10a6f5d37c
refs/heads/master: 01cde4d54327884a0b61ce8666092f5703557d4b
15 changes: 8 additions & 7 deletions trunk/drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -3891,9 +3891,7 @@ EXPORT_SYMBOL(transport_generic_map_mem_to_cmd);
static int transport_new_cmd_obj(struct se_cmd *cmd)
{
struct se_device *dev = cmd->se_dev;
u32 task_cdbs;
u32 rc;
int set_counts = 1;
int set_counts = 1, rc, task_cdbs;

/*
* Setup any BIDI READ tasks and memory from
Expand All @@ -3911,7 +3909,7 @@ static int transport_new_cmd_obj(struct se_cmd *cmd)
cmd->se_cmd_flags |= SCF_SCSI_CDB_EXCEPTION;
cmd->scsi_sense_reason =
TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
return PYX_TRANSPORT_LU_COMM_FAILURE;
return -EINVAL;
}
atomic_inc(&cmd->t_fe_count);
atomic_inc(&cmd->t_se_count);
Expand All @@ -3930,7 +3928,7 @@ static int transport_new_cmd_obj(struct se_cmd *cmd)
cmd->se_cmd_flags |= SCF_SCSI_CDB_EXCEPTION;
cmd->scsi_sense_reason =
TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
return PYX_TRANSPORT_LU_COMM_FAILURE;
return -EINVAL;
}

if (set_counts) {
Expand Down Expand Up @@ -4248,10 +4246,13 @@ static u32 transport_allocate_tasks(
struct scatterlist *sgl,
unsigned int sgl_nents)
{
if (cmd->se_cmd_flags & SCF_SCSI_DATA_SG_IO_CDB)
if (cmd->se_cmd_flags & SCF_SCSI_DATA_SG_IO_CDB) {
if (transport_cmd_get_valid_sectors(cmd) < 0)
return -EINVAL;

return transport_allocate_data_tasks(cmd, lba, data_direction,
sgl, sgl_nents);
else
} else
return transport_allocate_control_task(cmd);

}
Expand Down

0 comments on commit bb523f6

Please sign in to comment.