[SCSI] tgt: fix a rdma indirect transfer error bug
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Fri, 11 May 2007 10:10:45 +0000 (19:10 +0900)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Wed, 16 May 2007 16:45:17 +0000 (12:45 -0400)
This sets sg_dma_len to a proper value.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/libsrp.c

index 5631c199a8ebd0bafaa03a814e3c9ce817224cdc..732446e63963557dab5136c10c361acbc1a18a9a 100644 (file)
@@ -254,6 +254,7 @@ static int srp_indirect_data(struct scsi_cmnd *sc, struct srp_cmd *cmd,
 
                sg_init_one(&dummy, md, id->table_desc.len);
                sg_dma_address(&dummy) = token;
+               sg_dma_len(&dummy) = id->table_desc.len;
                err = rdma_io(sc, &dummy, 1, &id->table_desc, 1, DMA_TO_DEVICE,
                              id->table_desc.len);
                if (err) {