summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libiscsi.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2007-05-30 12:57:17 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2007-06-01 12:59:26 -0400
commit218432c68085d6c2b04df57daaf105d2ffa2aa61 (patch)
treecdc4646cc1d20f16bea893fb366f24c3ea50f0af /drivers/scsi/libiscsi.c
parentb2c6416736b847b91950bd43cc5153e11a1f83ee (diff)
downloadop-kernel-dev-218432c68085d6c2b04df57daaf105d2ffa2aa61.zip
op-kernel-dev-218432c68085d6c2b04df57daaf105d2ffa2aa61.tar.gz
[SCSI] iscsi tcp: fix iscsi xmit state machine
If iscsi_tcp partially sends a header, it would recalculate the header size and readd the size of the digest (if header digests are used).This would cause us to send sizeof(digest) extra bytes when we sent the rest of the header. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r--drivers/scsi/libiscsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 63981ed..63f0a15 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -125,6 +125,7 @@ static void iscsi_prep_scsi_cmd_pdu(struct iscsi_cmd_task *ctask)
MAX_COMMAND_SIZE - sc->cmd_len);
ctask->data_count = 0;
+ ctask->imm_count = 0;
if (sc->sc_data_direction == DMA_TO_DEVICE) {
hdr->flags |= ISCSI_FLAG_CMD_WRITE;
/*
@@ -141,7 +142,6 @@ static void iscsi_prep_scsi_cmd_pdu(struct iscsi_cmd_task *ctask)
*
* pad_count bytes to be sent as zero-padding
*/
- ctask->imm_count = 0;
ctask->unsol_count = 0;
ctask->unsol_offset = 0;
ctask->unsol_datasn = 0;
OpenPOWER on IntegriCloud