[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 #include <asm/io.h> 56 #include <asm/bitops.h> 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 int __ide_end_request(ide_drive_t *drive, struct request *rq, int uptodate, 71 int nr_sectors) 72 { 73 - unsigned int nbytes; 74 int ret = 1; 75 76 BUG_ON(!(rq->flags & REQ_STARTED)); ··· 81 HWGROUP(drive)->hwif->ide_dma_on(drive); 82 } 83 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; 93 blkdev_dequeue_request(rq); 94 HWGROUP(drive)->rq = NULL; 95 - blk_complete_request(rq); 96 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 } 106 107 return ret;
··· 55 #include <asm/io.h> 56 #include <asm/bitops.h> 57 58 int __ide_end_request(ide_drive_t *drive, struct request *rq, int uptodate, 59 int nr_sectors) 60 { 61 int ret = 1; 62 63 BUG_ON(!(rq->flags & REQ_STARTED)); ··· 94 HWGROUP(drive)->hwif->ide_dma_on(drive); 95 } 96 97 + if (!end_that_request_first(rq, uptodate, nr_sectors)) { 98 + add_disk_randomness(rq->rq_disk); 99 blkdev_dequeue_request(rq); 100 HWGROUP(drive)->rq = NULL; 101 + end_that_request_last(rq, uptodate); 102 ret = 0; 103 } 104 105 return ret;
-2
drivers/ide/ide-probe.c
··· 1011 blk_queue_max_hw_segments(q, max_sg_entries); 1012 blk_queue_max_phys_segments(q, max_sg_entries); 1013 1014 - blk_queue_softirq_done(q, ide_softirq_done); 1015 - 1016 /* assign drive queue */ 1017 drive->queue = q; 1018
··· 1011 blk_queue_max_hw_segments(q, max_sg_entries); 1012 blk_queue_max_phys_segments(q, max_sg_entries); 1013 1014 /* assign drive queue */ 1015 drive->queue = q; 1016
-1
include/linux/ide.h
··· 1002 1003 extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); 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 1007 /* 1008 * This is used on exit from the driver to designate the next irq handler
··· 1002 1003 extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); 1004 extern int __ide_end_request (ide_drive_t *drive, struct request *rq, int uptodate, int nrsecs); 1005 1006 /* 1007 * This is used on exit from the driver to designate the next irq handler