aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-01-06 03:49:03 -0500
committerJens Axboe <axboe@suse.de>2006-01-06 03:49:03 -0500
commit8ffdc6550c47f75ca4e6c9f30a2a89063e035cf2 (patch)
treea478b9acef5c66242a964154f7ad3a0ea750ef0f /drivers/ide
parent64100099ed22f71cce656c5c2caecf5c9cf255dc (diff)
[BLOCK] add @uptodate to end_that_request_last() and @error to rq_end_io_fn()
add @uptodate argument to end_that_request_last() and @error to rq_end_io_fn(). there's no generic way to pass error code to request completion function, making generic error handling of non-fs request difficult (rq->errors is driver-specific and each driver uses it differently). this patch adds @uptodate to end_that_request_last() and @error to rq_end_io_fn(). for fs requests, this doesn't really matter, so just using the same uptodate argument used in the last call to end_that_request_first() should suffice. imho, this can also help the generic command-carrying request jens is working on. Signed-off-by: tejun heo <htejun@gmail.com> Signed-Off-By: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-cd.c4
-rw-r--r--drivers/ide/ide-io.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 70aeb3a60120..d31117eb95aa 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -614,7 +614,7 @@ static void cdrom_end_request (ide_drive_t *drive, int uptodate)
614 */ 614 */
615 spin_lock_irqsave(&ide_lock, flags); 615 spin_lock_irqsave(&ide_lock, flags);
616 end_that_request_chunk(failed, 0, failed->data_len); 616 end_that_request_chunk(failed, 0, failed->data_len);
617 end_that_request_last(failed); 617 end_that_request_last(failed, 0);
618 spin_unlock_irqrestore(&ide_lock, flags); 618 spin_unlock_irqrestore(&ide_lock, flags);
619 } 619 }
620 620
@@ -1735,7 +1735,7 @@ end_request:
1735 1735
1736 spin_lock_irqsave(&ide_lock, flags); 1736 spin_lock_irqsave(&ide_lock, flags);
1737 blkdev_dequeue_request(rq); 1737 blkdev_dequeue_request(rq);
1738 end_that_request_last(rq); 1738 end_that_request_last(rq, 1);
1739 HWGROUP(drive)->rq = NULL; 1739 HWGROUP(drive)->rq = NULL;
1740 spin_unlock_irqrestore(&ide_lock, flags); 1740 spin_unlock_irqrestore(&ide_lock, flags);
1741 return ide_stopped; 1741 return ide_stopped;
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index ecfafcdafea4..8435b44a700b 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -89,7 +89,7 @@ int __ide_end_request(ide_drive_t *drive, struct request *rq, int uptodate,
89 89
90 blkdev_dequeue_request(rq); 90 blkdev_dequeue_request(rq);
91 HWGROUP(drive)->rq = NULL; 91 HWGROUP(drive)->rq = NULL;
92 end_that_request_last(rq); 92 end_that_request_last(rq, uptodate);
93 ret = 0; 93 ret = 0;
94 } 94 }
95 return ret; 95 return ret;
@@ -247,7 +247,7 @@ static void ide_complete_pm_request (ide_drive_t *drive, struct request *rq)
247 } 247 }
248 blkdev_dequeue_request(rq); 248 blkdev_dequeue_request(rq);
249 HWGROUP(drive)->rq = NULL; 249 HWGROUP(drive)->rq = NULL;
250 end_that_request_last(rq); 250 end_that_request_last(rq, 1);
251 spin_unlock_irqrestore(&ide_lock, flags); 251 spin_unlock_irqrestore(&ide_lock, flags);
252} 252}
253 253
@@ -379,7 +379,7 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
379 blkdev_dequeue_request(rq); 379 blkdev_dequeue_request(rq);
380 HWGROUP(drive)->rq = NULL; 380 HWGROUP(drive)->rq = NULL;
381 rq->errors = err; 381 rq->errors = err;
382 end_that_request_last(rq); 382 end_that_request_last(rq, !rq->errors);
383 spin_unlock_irqrestore(&ide_lock, flags); 383 spin_unlock_irqrestore(&ide_lock, flags);
384} 384}
385 385