aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-disk.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 13:09:16 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 13:09:16 -0400
commit92d15c2ccbb3e31a3fc71ad28fdb55e1319383c0 (patch)
tree8d83c0dc3c6b935d8367e331872f242b742f0a8a /drivers/ide/ide-disk.c
parentf20bf6125605acbbc7eb8c9420d7221c91aa83eb (diff)
parent644bd2f048972d75eb1979b1fdca257d528ce687 (diff)
Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block: (63 commits) Fix memory leak in dm-crypt SPARC64: sg chaining support SPARC: sg chaining support PPC: sg chaining support PS3: sg chaining support IA64: sg chaining support x86-64: enable sg chaining x86-64: update pci-gart iommu to sg helpers x86-64: update nommu to sg helpers x86-64: update calgary iommu to sg helpers swiotlb: sg chaining support i386: enable sg chaining i386 dma_map_sg: convert to using sg helpers mmc: need to zero sglist on init Panic in blk_rq_map_sg() from CCISS driver remove sglist_len remove blk_queue_max_phys_segments in libata revert sg segment size ifdefs Fixup u14-34f ENABLE_SG_CHAINING qla1280: enable use_sg_chaining option ...
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r--drivers/ide/ide-disk.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 4754769eda97..92177ca48b4d 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -716,32 +716,6 @@ static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
716 rq->buffer = rq->cmd; 716 rq->buffer = rq->cmd;
717} 717}
718 718
719static int idedisk_issue_flush(struct request_queue *q, struct gendisk *disk,
720 sector_t *error_sector)
721{
722 ide_drive_t *drive = q->queuedata;
723 struct request *rq;
724 int ret;
725
726 if (!drive->wcache)
727 return 0;
728
729 rq = blk_get_request(q, WRITE, __GFP_WAIT);
730
731 idedisk_prepare_flush(q, rq);
732
733 ret = blk_execute_rq(q, disk, rq, 0);
734
735 /*
736 * if we failed and caller wants error offset, get it
737 */
738 if (ret && error_sector)
739 *error_sector = ide_get_error_location(drive, rq->cmd);
740
741 blk_put_request(rq);
742 return ret;
743}
744
745/* 719/*
746 * This is tightly woven into the driver->do_special can not touch. 720 * This is tightly woven into the driver->do_special can not touch.
747 * DON'T do it again until a total personality rewrite is committed. 721 * DON'T do it again until a total personality rewrite is committed.
@@ -781,7 +755,6 @@ static void update_ordered(ide_drive_t *drive)
781 struct hd_driveid *id = drive->id; 755 struct hd_driveid *id = drive->id;
782 unsigned ordered = QUEUE_ORDERED_NONE; 756 unsigned ordered = QUEUE_ORDERED_NONE;
783 prepare_flush_fn *prep_fn = NULL; 757 prepare_flush_fn *prep_fn = NULL;
784 issue_flush_fn *issue_fn = NULL;
785 758
786 if (drive->wcache) { 759 if (drive->wcache) {
787 unsigned long long capacity; 760 unsigned long long capacity;
@@ -805,13 +778,11 @@ static void update_ordered(ide_drive_t *drive)
805 if (barrier) { 778 if (barrier) {
806 ordered = QUEUE_ORDERED_DRAIN_FLUSH; 779 ordered = QUEUE_ORDERED_DRAIN_FLUSH;
807 prep_fn = idedisk_prepare_flush; 780 prep_fn = idedisk_prepare_flush;
808 issue_fn = idedisk_issue_flush;
809 } 781 }
810 } else 782 } else
811 ordered = QUEUE_ORDERED_DRAIN; 783 ordered = QUEUE_ORDERED_DRAIN;
812 784
813 blk_queue_ordered(drive->queue, ordered, prep_fn); 785 blk_queue_ordered(drive->queue, ordered, prep_fn);
814 blk_queue_issue_flush_fn(drive->queue, issue_fn);
815} 786}
816 787
817static int write_cache(ide_drive_t *drive, int arg) 788static int write_cache(ide_drive_t *drive, int arg)