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 <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index f3ed5de..7ae6623 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -294,7 +294,7 @@
cmd.rq = rq;
if (blk_fs_request(rq) || pc->req_xfer) {
- ide_init_sg_cmd(&cmd, rq->nr_sectors);
+ ide_init_sg_cmd(&cmd, rq->nr_sectors << 9);
ide_map_sg(drive, &cmd);
}