From: Brian King Date: Wed, 7 Jun 2006 16:25:31 +0000 (-0500) Subject: [PATCH] libata: Setup nbytes in ata_sg_init_one X-Git-Tag: v2.6.18-rc1~1079^2~32 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=233277cad6dacca6a8e53743641cf43ef7f37c4a;p=karo-tx-linux.git [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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 3f1aa77621fd..76b633a2f304 100644 --- a/drivers/scsi/libata-core.c +++ b/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->orig_n_elem = 1; qc->buf_virt = buf; + qc->nbytes = buflen; sg = qc->__sg; sg_init_one(sg, buf, buflen);