Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124629
b: refs/heads/master
c: e2bac7c
h: refs/heads/master
i:
  124627: fd3decb
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Dec 29, 2008
1 parent 549aae4 commit 559fafa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 92 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: e5a7efeffdcc3062ade5208d16c278d8d484f82a
refs/heads/master: e2bac7c55e43c9018f2f4daf15437e836b26e709
91 changes: 0 additions & 91 deletions trunk/drivers/scsi/iscsi_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,48 +553,6 @@ iscsi_data_in(struct iscsi_conn *conn, struct iscsi_task *task)
return 0;
}

/**
* iscsi_solicit_data_init - initialize first Data-Out
* @conn: iscsi connection
* @task: scsi command task
* @r2t: R2T info
*
* Notes:
* Initialize first Data-Out within this R2T sequence and finds
* proper data_offset within this SCSI command.
*
* This function is called with connection lock taken.
**/
static void
iscsi_solicit_data_init(struct iscsi_conn *conn, struct iscsi_task *task,
struct iscsi_r2t_info *r2t)
{
struct iscsi_data *hdr;

hdr = &r2t->dtask.hdr;
memset(hdr, 0, sizeof(struct iscsi_data));
hdr->ttt = r2t->ttt;
hdr->datasn = cpu_to_be32(r2t->solicit_datasn);
r2t->solicit_datasn++;
hdr->opcode = ISCSI_OP_SCSI_DATA_OUT;
memcpy(hdr->lun, task->hdr->lun, sizeof(hdr->lun));
hdr->itt = task->hdr->itt;
hdr->exp_statsn = r2t->exp_statsn;
hdr->offset = cpu_to_be32(r2t->data_offset);
if (r2t->data_length > conn->max_xmit_dlength) {
hton24(hdr->dlength, conn->max_xmit_dlength);
r2t->data_count = conn->max_xmit_dlength;
hdr->flags = 0;
} else {
hton24(hdr->dlength, r2t->data_length);
r2t->data_count = r2t->data_length;
hdr->flags = ISCSI_FLAG_CMD_FINAL;
}
conn->dataout_pdus_cnt++;

r2t->sent = 0;
}

/**
* iscsi_r2t_rsp - iSCSI R2T Response processing
* @conn: iscsi connection
Expand Down Expand Up @@ -1311,55 +1269,6 @@ iscsi_tcp_send_linear_data_prepare(struct iscsi_conn *conn, void *data,
data, len, NULL, tx_hash);
}

/**
* iscsi_solicit_data_cont - initialize next Data-Out
* @conn: iscsi connection
* @task: scsi command task
* @r2t: R2T info
* @left: bytes left to transfer
*
* Notes:
* Initialize next Data-Out within this R2T sequence and continue
* to process next Scatter-Gather element(if any) of this SCSI command.
*
* Called under connection lock.
**/
static int
iscsi_solicit_data_cont(struct iscsi_conn *conn, struct iscsi_task *task,
struct iscsi_r2t_info *r2t)
{
struct iscsi_data *hdr;
int new_offset, left;

BUG_ON(r2t->data_length - r2t->sent < 0);
left = r2t->data_length - r2t->sent;
if (left == 0)
return 0;

hdr = &r2t->dtask.hdr;
memset(hdr, 0, sizeof(struct iscsi_data));
hdr->ttt = r2t->ttt;
hdr->datasn = cpu_to_be32(r2t->solicit_datasn);
r2t->solicit_datasn++;
hdr->opcode = ISCSI_OP_SCSI_DATA_OUT;
memcpy(hdr->lun, task->hdr->lun, sizeof(hdr->lun));
hdr->itt = task->hdr->itt;
hdr->exp_statsn = r2t->exp_statsn;
new_offset = r2t->data_offset + r2t->sent;
hdr->offset = cpu_to_be32(new_offset);
if (left > conn->max_xmit_dlength) {
hton24(hdr->dlength, conn->max_xmit_dlength);
r2t->data_count = conn->max_xmit_dlength;
} else {
hton24(hdr->dlength, left);
r2t->data_count = left;
hdr->flags = ISCSI_FLAG_CMD_FINAL;
}

conn->dataout_pdus_cnt++;
return 1;
}

static int iscsi_tcp_pdu_init(struct iscsi_task *task,
unsigned int offset, unsigned int count)
{
Expand Down

0 comments on commit 559fafa

Please sign in to comment.