aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-disk.c
diff options
context:
space:
mode:
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)