From: Brian King Date: Tue, 30 Jan 2007 17:32:26 +0000 (-0600) Subject: libata: Initialize nbytes for internal sg commands X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=49c8042996c84f0df6c49ea2e28a7ef38cd7d773;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Brian King Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index cf707029352e..667acd283364 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -1250,6 +1250,7 @@ unsigned ata_exec_internal_sg(struct ata_device *dev, ata_sg_init(qc, sg, n_elem); qc->nsect = buflen / ATA_SECT_SIZE; + qc->nbytes = buflen; } qc->private_data = &wait;