From: FUJITA Tomonori Date: Fri, 11 May 2007 10:10:45 +0000 (+0900) Subject: [SCSI] tgt: fix a rdma indirect transfer error bug X-Git-Tag: v2.6.22-rc4~100^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcd4e22540309f2f135f278cffe134c63dbcaee5;p=linux-2.6 [SCSI] tgt: fix a rdma indirect transfer error bug This sets sg_dma_len to a proper value. Signed-off-by: FUJITA Tomonori Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/libsrp.c b/drivers/scsi/libsrp.c index 5631c199a8..732446e639 100644 --- a/drivers/scsi/libsrp.c +++ b/drivers/scsi/libsrp.c @@ -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) {