From bf717c0a2e18dbe82eeb28e57b0abede3cdf45d6 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Fri, 27 Mar 2009 12:46:47 +0100 Subject: ide: keep track of number of bytes instead of sectors in struct ide_cmd * Pass number of bytes instead of sectors to ide_init_sg_cmd(). * Pass number of bytes to process to ide_pio_sector() and rename it to ide_pio_bytes(). * Rename ->nsect field to ->nbytes in struct ide_cmd and use ->nbytes, ->nleft and ->cursg_ofs to keep track of number of bytes instead of sectors. There should be no functional changes caused by this patch. Acked-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/ide-io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/ide/ide-io.c') diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index b4901b6..1adc5e2 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -245,9 +245,9 @@ void ide_map_sg(ide_drive_t *drive, struct ide_cmd *cmd) } EXPORT_SYMBOL_GPL(ide_map_sg); -void ide_init_sg_cmd(struct ide_cmd *cmd, int nsect) +void ide_init_sg_cmd(struct ide_cmd *cmd, unsigned int nr_bytes) { - cmd->nsect = cmd->nleft = nsect; + cmd->nbytes = cmd->nleft = nr_bytes; cmd->cursg_ofs = 0; cmd->cursg = NULL; } @@ -272,7 +272,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, if (cmd) { if (cmd->protocol == ATA_PROT_PIO) { - ide_init_sg_cmd(cmd, rq->nr_sectors); + ide_init_sg_cmd(cmd, rq->nr_sectors << 9); ide_map_sg(drive, cmd); } -- cgit v1.1