[PATCH] libata: Setup nbytes in ata_sg_init_one
authorBrian King <brking@us.ibm.com>
Wed, 7 Jun 2006 16:25:31 +0000 (11:25 -0500)
committerJeff Garzik <jeff@garzik.org>
Mon, 12 Jun 2006 03:24:25 +0000 (23:24 -0400)
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>
drivers/scsi/libata-core.c

index 3f1aa77621fd8ba0b7adeab77f74af813aca9446..76b633a2f304f266faa33fb37f4e6f36255b824a 100644 (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);