aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-01-12 14:44:12 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 15:00:47 -0500
commitba027def7be0d6494b72603d5758acc0fb1c7514 (patch)
tree0390413d299350f838f2fc01ae222d8d3cdf6194 /drivers
parent661dd5c840851194c7ee5a2603d5354dcf9bd212 (diff)
[PATCH] Revert ide softirq handling
There's a problem with the REQ_BLOCK_PC handling as well (bad ->data_len handling) where it could actually complete a request ahead of time. I suggest we just back this out for now, I will resubmit it later when I'm fully confident in it. This reverts commit 8672d57138b34447719cd7749f3d21070e1175a1 Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-io.c34
-rw-r--r--drivers/ide/ide-probe.c2
2 files changed, 3 insertions, 33 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