diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-disk.c | 13 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 13 |
2 files changed, 6 insertions, 20 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 7433e07de30e..7c5b01ce51d2 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -516,10 +516,10 @@ static int ide_do_setfeature(ide_drive_t *drive, u8 feature, u8 nsect) | |||
516 | return ide_no_data_taskfile(drive, &cmd); | 516 | return ide_no_data_taskfile(drive, &cmd); |
517 | } | 517 | } |
518 | 518 | ||
519 | static void update_ordered(ide_drive_t *drive) | 519 | static void update_flush(ide_drive_t *drive) |
520 | { | 520 | { |
521 | u16 *id = drive->id; | 521 | u16 *id = drive->id; |
522 | unsigned ordered = QUEUE_ORDERED_NONE; | 522 | unsigned flush = 0; |
523 | 523 | ||
524 | if (drive->dev_flags & IDE_DFLAG_WCACHE) { | 524 | if (drive->dev_flags & IDE_DFLAG_WCACHE) { |
525 | unsigned long long capacity; | 525 | unsigned long long capacity; |
@@ -543,13 +543,12 @@ static void update_ordered(ide_drive_t *drive) | |||
543 | drive->name, barrier ? "" : "not "); | 543 | drive->name, barrier ? "" : "not "); |
544 | 544 | ||
545 | if (barrier) { | 545 | if (barrier) { |
546 | ordered = QUEUE_ORDERED_DRAIN_FLUSH; | 546 | flush = REQ_FLUSH; |
547 | blk_queue_prep_rq(drive->queue, idedisk_prep_fn); | 547 | blk_queue_prep_rq(drive->queue, idedisk_prep_fn); |
548 | } | 548 | } |
549 | } else | 549 | } |
550 | ordered = QUEUE_ORDERED_DRAIN; | ||
551 | 550 | ||
552 | blk_queue_ordered(drive->queue, ordered); | 551 | blk_queue_flush(drive->queue, flush); |
553 | } | 552 | } |
554 | 553 | ||
555 | ide_devset_get_flag(wcache, IDE_DFLAG_WCACHE); | 554 | ide_devset_get_flag(wcache, IDE_DFLAG_WCACHE); |
@@ -572,7 +571,7 @@ static int set_wcache(ide_drive_t *drive, int arg) | |||
572 | } | 571 | } |
573 | } | 572 | } |
574 | 573 | ||
575 | update_ordered(drive); | 574 | update_flush(drive); |
576 | 575 | ||
577 | return err; | 576 | return err; |
578 | } | 577 | } |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index a381be814070..999dac054bcc 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -441,19 +441,6 @@ void do_ide_request(struct request_queue *q) | |||
441 | struct request *rq = NULL; | 441 | struct request *rq = NULL; |
442 | ide_startstop_t startstop; | 442 | ide_startstop_t startstop; |
443 | 443 | ||
444 | /* | ||
445 | * drive is doing pre-flush, ordered write, post-flush sequence. even | ||
446 | * though that is 3 requests, it must be seen as a single transaction. | ||
447 | * we must not preempt this drive until that is complete | ||
448 | */ | ||
449 | if (blk_queue_flushing(q)) | ||
450 | /* | ||
451 | * small race where queue could get replugged during | ||
452 | * the 3-request flush cycle, just yank the plug since | ||
453 | * we want it to finish asap | ||
454 | */ | ||
455 | blk_remove_plug(q); | ||
456 | |||
457 | spin_unlock_irq(q->queue_lock); | 444 | spin_unlock_irq(q->queue_lock); |
458 | 445 | ||
459 | /* HLD do_request() callback might sleep, make sure it's okay */ | 446 | /* HLD do_request() callback might sleep, make sure it's okay */ |