Skip to contentSkip to conversation

libata: Setup nbytes in ata_sg_init_one

PATCH Applied Brian King 2 participants 2 messages Jun 7, 2006 – Jun 12, 2006

Subsystems (2)
lore
Share & tools
lore

Brian King

author
#0 lore raw

PATCH 1/6 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.

---

 libata-dev-bjking1/drivers/scsi/libata-core.c |    1 +
 1 files changed, 1 insertion(+)
drivers/scsi/libata-core.c renamed from drivers/scsi/libata-core.c~libata_setup_nbytes +1 -0
diff -puN drivers/scsi/libata-core.c~libata_setup_nbytes drivers/scsi/libata-core.c
@@ -3321,6 +3321,7 @@ void ata_sg_init_one(struct ata_queued_c
 	qc->n_elem = 1;
 	qc->orig_n_elem = 1;
 	qc->buf_virt = buf;
+	qc->nbytes = buflen;
 
 	sg = qc->__sg;
 	sg_init_one(sg, buf, buflen);

_