Commit 49c80429 authored by Brian King's avatar Brian King Committed by Jeff Garzik

libata: Initialize nbytes for internal sg commands

Some LLDDs, like ipr, use nbytes and pad_len to determine
the total data transfer length of a command. Make sure
nbytes gets initialized for internally generated commands.
Signed-off-by: default avatarBrian King <brking@linux.vnet.ibm.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 0777721c
...@@ -1250,6 +1250,7 @@ unsigned ata_exec_internal_sg(struct ata_device *dev, ...@@ -1250,6 +1250,7 @@ unsigned ata_exec_internal_sg(struct ata_device *dev,
ata_sg_init(qc, sg, n_elem); ata_sg_init(qc, sg, n_elem);
qc->nsect = buflen / ATA_SECT_SIZE; qc->nsect = buflen / ATA_SECT_SIZE;
qc->nbytes = buflen;
} }
qc->private_data = &wait; qc->private_data = &wait;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment