ide: pass number of bytes to complete to ide_complete_rq()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:44 +0000 (12:46 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:44 +0000 (12:46 +0100)
There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-atapi.c
drivers/ide/ide-eh.c
drivers/ide/ide-floppy.c
drivers/ide/ide-io.c
drivers/ide/ide-tape.c
drivers/ide/ide-taskfile.c
include/linux/ide.h

index 5504a84e9bd6d99694d9f10eedc47663f7af84f3..30156aa61016421cf846a33532bcb3c9a58b5f14 100644 (file)
@@ -404,7 +404,7 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
 
                if (blk_special_request(rq)) {
                        rq->errors = 0;
-                       ide_complete_rq(drive, 0);
+                       ide_complete_rq(drive, 0, blk_rq_bytes(rq));
                } else {
                        if (blk_fs_request(rq) == 0 && uptodate <= 0) {
                                if (rq->errors == 0)
index 6ad419414f95506feec1982104181cd5e3b590d1..ccfd06ef5bb91508c80fedd99996727a83284ea5 100644 (file)
@@ -134,7 +134,7 @@ ide_startstop_t ide_error(ide_drive_t *drive, const char *msg, u8 stat)
                        return ide_stopped;
                }
                rq->errors = err;
-               ide_complete_rq(drive, err ? -EIO : 0);
+               ide_complete_rq(drive, err ? -EIO : 0, blk_rq_bytes(rq));
                return ide_stopped;
        }
 
index 572aa9696daded9ace53b175f53619853915d0b1..7ef2b90e530a94b8ad6d96d4a1ba26d417a03e80 100644 (file)
@@ -261,7 +261,7 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive,
 
                if (blk_special_request(rq)) {
                        rq->errors = 0;
-                       ide_complete_rq(drive, 0);
+                       ide_complete_rq(drive, 0, blk_rq_bytes(rq));
                        return ide_stopped;
                } else
                        goto out_end;
index 4a79d28600f50a29a183b4da349b4f5f945754b8..a4aa4bf847382ddcfc30ffe06cf5a02d69e3054c 100644 (file)
@@ -141,13 +141,13 @@ void ide_complete_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat, u8 err)
                kfree(cmd);
 }
 
-int ide_complete_rq(ide_drive_t *drive, int error)
+int ide_complete_rq(ide_drive_t *drive, int error, unsigned int nr_bytes)
 {
        ide_hwif_t *hwif = drive->hwif;
        struct request *rq = hwif->rq;
        int rc;
 
-       rc = blk_end_request(rq, error, blk_rq_bytes(rq));
+       rc = blk_end_request(rq, error, nr_bytes);
        if (rc == 0)
                hwif->rq = NULL;
 
@@ -164,7 +164,7 @@ void ide_kill_rq(ide_drive_t *drive, struct request *rq)
 
        if ((media == ide_floppy || media == ide_tape) && drv_req) {
                rq->errors = 0;
-               ide_complete_rq(drive, 0);
+               ide_complete_rq(drive, 0, blk_rq_bytes(rq));
        } else {
                if (media == ide_tape)
                        rq->errors = IDE_DRV_ERROR_GENERAL;
@@ -312,7 +312,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
        printk("%s: DRIVE_CMD (null)\n", drive->name);
 #endif
        rq->errors = 0;
-       ide_complete_rq(drive, 0);
+       ide_complete_rq(drive, 0, blk_rq_bytes(rq));
 
        return ide_stopped;
 }
index 94f6fb8c147a894bc1144d6e25f6d3aadffe6aa3..2df708927687f8be2cbb5a9d14e22ab0bff8f64e 100644 (file)
@@ -778,7 +778,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
                                        "Two DSC requests were queued\n");
                        drive->failed_pc = NULL;
                        rq->errors = 0;
-                       ide_complete_rq(drive, 0);
+                       ide_complete_rq(drive, 0, blk_rq_bytes(rq));
                        return ide_stopped;
                }
 
index e9d008ef3f33d01e8b9865ae80a3b442d7f13856..b9d7ba2c8a0084746c3ad727f264056052810c5a 100644 (file)
@@ -294,7 +294,7 @@ void ide_finish_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat)
 
        ide_complete_cmd(drive, cmd, stat, err);
        rq->errors = err;
-       ide_complete_rq(drive, err ? -EIO : 0);
+       ide_complete_rq(drive, err ? -EIO : 0, blk_rq_bytes(rq));
 }
 
 /*
index bb62bfaf02e0d520485d51ce7c47492ba0f734b0..cbfb64fdeda71e6ad99d8dfd31a4753406b176f9 100644 (file)
@@ -1166,7 +1166,7 @@ extern int ide_devset_execute(ide_drive_t *drive,
                              const struct ide_devset *setting, int arg);
 
 void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8);
-int ide_complete_rq(ide_drive_t *, int);
+int ide_complete_rq(ide_drive_t *, int, unsigned int);
 
 void ide_tf_dump(const char *, struct ide_taskfile *);