Browse Source

[PATCH] libata: Setup nbytes in ata_sg_init_one

Setup nbytes in ata_sg_init_one to the total transfer length
of the command. This is needed by some HBAs that need to know
the total transfer length of each command.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Brian King 19 years ago
parent
commit
233277cad6
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/scsi/libata-core.c

+ 1 - 0
drivers/scsi/libata-core.c

@@ -3287,6 +3287,7 @@ void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen)
 	qc->n_elem = 1;
 	qc->n_elem = 1;
 	qc->orig_n_elem = 1;
 	qc->orig_n_elem = 1;
 	qc->buf_virt = buf;
 	qc->buf_virt = buf;
+	qc->nbytes = buflen;
 
 
 	sg = qc->__sg;
 	sg = qc->__sg;
 	sg_init_one(sg, buf, buflen);
 	sg_init_one(sg, buf, buflen);