aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-io.c34
-rw-r--r--drivers/ide/ide-probe.c2
-rw-r--r--include/linux/ide.h1
3 files changed, 3 insertions, 34 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index bcbaeb50bb93..8d50df4526a4 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -55,22 +55,9 @@
55#include <asm/io.h> 55#include <asm/io.h>
56#include <asm/bitops.h> 56#include <asm/bitops.h>
57 57
58void ide_softirq_done(struct request *rq)
59{
60 request_queue_t *q = rq->q;
61
62 add_disk_randomness(rq->rq_disk);
63 end_that_request_chunk(rq, 1, rq->data_len);
64
65 spin_lock_irq(q->queue_lock);
66 end_that_request_last(rq, 1);
67 spin_unlock_irq(q->queue_lock);
68}
69
70int __ide_end_request(ide_drive_t *drive, struct request *rq, int uptodate, 58int __ide_end_request(ide_drive_t *drive, struct request *rq, int uptodate,
71 int nr_sectors) 59 int nr_sectors)
72{ 60{
73 unsigned int nbytes;
74 int ret = 1; 61 int ret = 1;
75 62
76 BUG_ON(!(rq->flags & REQ_STARTED)); 63 BUG_ON(!(rq->flags & REQ_STARTED));
@@ -94,27 +81,12 @@ int __ide_end_request(ide_drive_t *drive, struct request *rq, int uptodate,
94 HWGROUP(drive)->hwif->ide_dma_on(drive); 81 HWGROUP(drive)->hwif->ide_dma_on(drive);
95 } 82 }
96 83
97 /* 84 if (!end_that_request_first(rq, uptodate, nr_sectors)) {
98 * For partial completions (or non fs/pc requests), use the regular 85 add_disk_randomness(rq->rq_disk);
99 * direct completion path. Same thing for requests that failed, to
100 * preserve the ->errors value we use the normal completion path
101 * for those
102 */
103 nbytes = nr_sectors << 9;
104 if (!rq->errors && rq_all_done(rq, nbytes)) {
105 rq->data_len = nbytes;
106 blkdev_dequeue_request(rq); 86 blkdev_dequeue_request(rq);
107 HWGROUP(drive)->rq = NULL; 87 HWGROUP(drive)->rq = NULL;
108 blk_complete_request(rq); 88 end_that_request_last(rq, uptodate);
109 ret = 0; 89 ret = 0;
110 } else {
111 if (!end_that_request_first(rq, uptodate, nr_sectors)) {
112 add_disk_randomness(rq->rq_disk);
113 blkdev_dequeue_request(rq);
114 HWGROUP(drive)->rq = NULL;
115 end_that_request_last(rq, uptodate);
116 ret = 0;
117 }
118 } 90 }
119 91
120 return ret; 92 return ret;
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 7cb2d86601db..e7425546b4b1 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1011,8 +1011,6 @@ static int ide_init_queue(ide_drive_t *drive)
1011 blk_queue_max_hw_segments(q, max_sg_entries); 1011 blk_queue_max_hw_segments(q, max_sg_entries);
1012 blk_queue_max_phys_segments(q, max_sg_entries); 1012 blk_queue_max_phys_segments(q, max_sg_entries);
1013 1013
1014 blk_queue_softirq_done(q, ide_softirq_done);
1015
1016 /* assign drive queue */ 1014 /* assign drive queue */
1017 drive->queue = q; 1015 drive->queue = q;
1018 1016
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 9a8c05dbe4f3..f2e1b5b22898 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1002,7 +1002,6 @@ extern int noautodma;
1002 1002
1003extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); 1003extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs);
1004extern int __ide_end_request (ide_drive_t *drive, struct request *rq, int uptodate, int nrsecs); 1004extern int __ide_end_request (ide_drive_t *drive, struct request *rq, int uptodate, int nrsecs);
1005extern void ide_softirq_done(struct request *rq);
1006 1005
1007/* 1006/*
1008 * This is used on exit from the driver to designate the next irq handler 1007 * This is used on exit from the driver to designate the next irq handler