[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>

authored by Jens Axboe and committed by Linus Torvalds ba027def 661dd5c8

+3 -34
+3 -31
drivers/ide/ide-io.c
··· 55 55 #include <asm/io.h> 56 56 #include <asm/bitops.h> 57 57 58 - void 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 - 70 58 int __ide_end_request(ide_drive_t *drive, struct request *rq, int uptodate, 71 59 int nr_sectors) 72 60 { 73 - unsigned int nbytes; 74 61 int ret = 1; 75 62 76 63 BUG_ON(!(rq->flags & REQ_STARTED)); ··· 81 94 HWGROUP(drive)->hwif->ide_dma_on(drive); 82 95 } 83 96 84 - /* 85 - * For partial completions (or non fs/pc requests), use the regular 86 - * direct completion path. Same thing for requests that failed, to 87 - * preserve the ->errors value we use the normal completion path 88 - * for those 89 - */ 90 - nbytes = nr_sectors << 9; 91 - if (!rq->errors && rq_all_done(rq, nbytes)) { 92 - rq->data_len = nbytes; 97 + if (!end_that_request_first(rq, uptodate, nr_sectors)) { 98 + add_disk_randomness(rq->rq_disk); 93 99 blkdev_dequeue_request(rq); 94 100 HWGROUP(drive)->rq = NULL; 95 - blk_complete_request(rq); 101 + end_that_request_last(rq, uptodate); 96 102 ret = 0; 97 - } else { 98 - if (!end_that_request_first(rq, uptodate, nr_sectors)) { 99 - add_disk_randomness(rq->rq_disk); 100 - blkdev_dequeue_request(rq); 101 - HWGROUP(drive)->rq = NULL; 102 - end_that_request_last(rq, uptodate); 103 - ret = 0; 104 - } 105 103 } 106 104 107 105 return ret;
-2
drivers/ide/ide-probe.c
··· 1011 1011 blk_queue_max_hw_segments(q, max_sg_entries); 1012 1012 blk_queue_max_phys_segments(q, max_sg_entries); 1013 1013 1014 - blk_queue_softirq_done(q, ide_softirq_done); 1015 - 1016 1014 /* assign drive queue */ 1017 1015 drive->queue = q; 1018 1016
-1
include/linux/ide.h
··· 1002 1002 1003 1003 extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); 1004 1004 extern int __ide_end_request (ide_drive_t *drive, struct request *rq, int uptodate, int nrsecs); 1005 - extern void ide_softirq_done(struct request *rq); 1006 1005 1007 1006 /* 1008 1007 * This is used on exit from the driver to designate the next irq handler