There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
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)
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;
}
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;
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;
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;
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;
}
"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;
}
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));
}
/*
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 *);