projects/linux·commit 49c80429

libata: Initialize nbytes for internal sg commands

49c80429 · Brian King <[email protected]> · 2007-01-30 11:32:26 -06:00

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 <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
Commit
49c8042996c84f0df6c49ea2e28a7ef38cd7d773
Parents
0777721c

Changes

1 files changed · +1 −0

FileStatusAddDelContent
drivers/ata/libata-core.cmodified+1−0View file

drivers/ata/libata-core.c

View file
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index cf70702..667acd2 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;