Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 233277ca authored by Brian King's avatar Brian King Committed by Jeff Garzik
Browse files

[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: default avatarBrian King <brking@us.ibm.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent bd5d825c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);