|
@@ -55,22 +55,9 @@
|
|
|
#include <asm/io.h>
|
|
|
#include <asm/bitops.h>
|
|
|
|
|
|
-void ide_softirq_done(struct request *rq)
|
|
|
-{
|
|
|
- request_queue_t *q = rq->q;
|
|
|
-
|
|
|
- add_disk_randomness(rq->rq_disk);
|
|
|
- end_that_request_chunk(rq, 1, rq->data_len);
|
|
|
-
|
|
|
- spin_lock_irq(q->queue_lock);
|
|
|
- end_that_request_last(rq, 1);
|
|
|
- spin_unlock_irq(q->queue_lock);
|
|
|
-}
|
|
|
-
|
|
|
int __ide_end_request(ide_drive_t *drive, struct request *rq, int uptodate,
|
|
|
int nr_sectors)
|
|
|
{
|
|
|
- unsigned int nbytes;
|
|
|
int ret = 1;
|
|
|
|
|
|
BUG_ON(!(rq->flags & REQ_STARTED));
|
|
@@ -94,27 +81,12 @@ int __ide_end_request(ide_drive_t *drive, struct request *rq, int uptodate,
|
|
|
HWGROUP(drive)->hwif->ide_dma_on(drive);
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- * For partial completions (or non fs/pc requests), use the regular
|
|
|
- * direct completion path. Same thing for requests that failed, to
|
|
|
- * preserve the ->errors value we use the normal completion path
|
|
|
- * for those
|
|
|
- */
|
|
|
- nbytes = nr_sectors << 9;
|
|
|
- if (!rq->errors && rq_all_done(rq, nbytes)) {
|
|
|
- rq->data_len = nbytes;
|
|
|
+ if (!end_that_request_first(rq, uptodate, nr_sectors)) {
|
|
|
+ add_disk_randomness(rq->rq_disk);
|
|
|
blkdev_dequeue_request(rq);
|
|
|
HWGROUP(drive)->rq = NULL;
|
|
|
- blk_complete_request(rq);
|
|
|
+ end_that_request_last(rq, uptodate);
|
|
|
ret = 0;
|
|
|
- } else {
|
|
|
- if (!end_that_request_first(rq, uptodate, nr_sectors)) {
|
|
|
- add_disk_randomness(rq->rq_disk);
|
|
|
- blkdev_dequeue_request(rq);
|
|
|
- HWGROUP(drive)->rq = NULL;
|
|
|
- end_that_request_last(rq, uptodate);
|
|
|
- ret = 0;
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
return ret;
|