libata: Initialize nbytes for internal sg commands
authorBrian King <brking@linux.vnet.ibm.com>
Tue, 30 Jan 2007 17:32:26 +0000 (11:32 -0600)
committerJeff Garzik <jeff@garzik.org>
Fri, 2 Feb 2007 16:52:05 +0000 (11:52 -0500)
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 <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c

index cf70702..667acd2 100644 (file)
@@ -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;