[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>
This commit is contained in:
Brian King 2006-06-07 11:25:31 -05:00 committed by Jeff Garzik
parent bd5d825c94
commit 233277cad6

View File

@ -3287,6 +3287,7 @@ void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen)
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);