diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:44 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:44 -0400 |
commit | f974b196f58fe042c7b2b4c0ee15d5a6112dbf40 (patch) | |
tree | b717d35a8d6b3c60aa7a95ca1a1002918cb678a1 | |
parent | a9587fd8c48415cc93fef7f4ba7748a5d3477e7b (diff) |
ide: pass number of bytes to complete to ide_complete_rq()
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/ide-atapi.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-eh.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-floppy.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 8 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-taskfile.c | 2 | ||||
-rw-r--r-- | include/linux/ide.h | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index 5504a84e9bd6..30156aa61016 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -404,7 +404,7 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive) | |||
404 | 404 | ||
405 | if (blk_special_request(rq)) { | 405 | if (blk_special_request(rq)) { |
406 | rq->errors = 0; | 406 | rq->errors = 0; |
407 | ide_complete_rq(drive, 0); | 407 | ide_complete_rq(drive, 0, blk_rq_bytes(rq)); |
408 | } else { | 408 | } else { |
409 | if (blk_fs_request(rq) == 0 && uptodate <= 0) { | 409 | if (blk_fs_request(rq) == 0 && uptodate <= 0) { |
410 | if (rq->errors == 0) | 410 | if (rq->errors == 0) |
diff --git a/drivers/ide/ide-eh.c b/drivers/ide/ide-eh.c index 6ad419414f95..ccfd06ef5bb9 100644 --- a/drivers/ide/ide-eh.c +++ b/drivers/ide/ide-eh.c | |||
@@ -134,7 +134,7 @@ ide_startstop_t ide_error(ide_drive_t *drive, const char *msg, u8 stat) | |||
134 | return ide_stopped; | 134 | return ide_stopped; |
135 | } | 135 | } |
136 | rq->errors = err; | 136 | rq->errors = err; |
137 | ide_complete_rq(drive, err ? -EIO : 0); | 137 | ide_complete_rq(drive, err ? -EIO : 0, blk_rq_bytes(rq)); |
138 | return ide_stopped; | 138 | return ide_stopped; |
139 | } | 139 | } |
140 | 140 | ||
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 572aa9696dad..7ef2b90e530a 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -261,7 +261,7 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive, | |||
261 | 261 | ||
262 | if (blk_special_request(rq)) { | 262 | if (blk_special_request(rq)) { |
263 | rq->errors = 0; | 263 | rq->errors = 0; |
264 | ide_complete_rq(drive, 0); | 264 | ide_complete_rq(drive, 0, blk_rq_bytes(rq)); |
265 | return ide_stopped; | 265 | return ide_stopped; |
266 | } else | 266 | } else |
267 | goto out_end; | 267 | goto out_end; |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 4a79d28600f5..a4aa4bf84738 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -141,13 +141,13 @@ void ide_complete_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat, u8 err) | |||
141 | kfree(cmd); | 141 | kfree(cmd); |
142 | } | 142 | } |
143 | 143 | ||
144 | int ide_complete_rq(ide_drive_t *drive, int error) | 144 | int ide_complete_rq(ide_drive_t *drive, int error, unsigned int nr_bytes) |
145 | { | 145 | { |
146 | ide_hwif_t *hwif = drive->hwif; | 146 | ide_hwif_t *hwif = drive->hwif; |
147 | struct request *rq = hwif->rq; | 147 | struct request *rq = hwif->rq; |
148 | int rc; | 148 | int rc; |
149 | 149 | ||
150 | rc = blk_end_request(rq, error, blk_rq_bytes(rq)); | 150 | rc = blk_end_request(rq, error, nr_bytes); |
151 | if (rc == 0) | 151 | if (rc == 0) |
152 | hwif->rq = NULL; | 152 | hwif->rq = NULL; |
153 | 153 | ||
@@ -164,7 +164,7 @@ void ide_kill_rq(ide_drive_t *drive, struct request *rq) | |||
164 | 164 | ||
165 | if ((media == ide_floppy || media == ide_tape) && drv_req) { | 165 | if ((media == ide_floppy || media == ide_tape) && drv_req) { |
166 | rq->errors = 0; | 166 | rq->errors = 0; |
167 | ide_complete_rq(drive, 0); | 167 | ide_complete_rq(drive, 0, blk_rq_bytes(rq)); |
168 | } else { | 168 | } else { |
169 | if (media == ide_tape) | 169 | if (media == ide_tape) |
170 | rq->errors = IDE_DRV_ERROR_GENERAL; | 170 | rq->errors = IDE_DRV_ERROR_GENERAL; |
@@ -312,7 +312,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, | |||
312 | printk("%s: DRIVE_CMD (null)\n", drive->name); | 312 | printk("%s: DRIVE_CMD (null)\n", drive->name); |
313 | #endif | 313 | #endif |
314 | rq->errors = 0; | 314 | rq->errors = 0; |
315 | ide_complete_rq(drive, 0); | 315 | ide_complete_rq(drive, 0, blk_rq_bytes(rq)); |
316 | 316 | ||
317 | return ide_stopped; | 317 | return ide_stopped; |
318 | } | 318 | } |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 94f6fb8c147a..2df708927687 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -778,7 +778,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive, | |||
778 | "Two DSC requests were queued\n"); | 778 | "Two DSC requests were queued\n"); |
779 | drive->failed_pc = NULL; | 779 | drive->failed_pc = NULL; |
780 | rq->errors = 0; | 780 | rq->errors = 0; |
781 | ide_complete_rq(drive, 0); | 781 | ide_complete_rq(drive, 0, blk_rq_bytes(rq)); |
782 | return ide_stopped; | 782 | return ide_stopped; |
783 | } | 783 | } |
784 | 784 | ||
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index e9d008ef3f33..b9d7ba2c8a00 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -294,7 +294,7 @@ void ide_finish_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat) | |||
294 | 294 | ||
295 | ide_complete_cmd(drive, cmd, stat, err); | 295 | ide_complete_cmd(drive, cmd, stat, err); |
296 | rq->errors = err; | 296 | rq->errors = err; |
297 | ide_complete_rq(drive, err ? -EIO : 0); | 297 | ide_complete_rq(drive, err ? -EIO : 0, blk_rq_bytes(rq)); |
298 | } | 298 | } |
299 | 299 | ||
300 | /* | 300 | /* |
diff --git a/include/linux/ide.h b/include/linux/ide.h index bb62bfaf02e0..cbfb64fdeda7 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1166,7 +1166,7 @@ extern int ide_devset_execute(ide_drive_t *drive, | |||
1166 | const struct ide_devset *setting, int arg); | 1166 | const struct ide_devset *setting, int arg); |
1167 | 1167 | ||
1168 | void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8); | 1168 | void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8); |
1169 | int ide_complete_rq(ide_drive_t *, int); | 1169 | int ide_complete_rq(ide_drive_t *, int, unsigned int); |
1170 | 1170 | ||
1171 | void ide_tf_dump(const char *, struct ide_taskfile *); | 1171 | void ide_tf_dump(const char *, struct ide_taskfile *); |
1172 | 1172 | ||