Skip to content

Commit

Permalink
libata: Initialize nbytes for internal sg commands
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Brian King authored and Jeff Garzik committed Feb 2, 2007
1 parent 0777721 commit 49c8042
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 49c8042

Please sign in to comment.