diff options
author | Tejun Heo <tj@kernel.org> | 2011-05-02 08:08:43 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-05-02 08:08:47 -0400 |
commit | aff364860aa105b2deacc6f21ec8ef524460e3fc (patch) | |
tree | 18409ebe16b25b141598da9b6386d69416c06afa /drivers/ide/ide-io.c | |
parent | c7a7b814c9dca9ee01b38e63b4a46de87156d3b6 (diff) | |
parent | 993ba1585cbb03fab012e41d1a5d24330a283b31 (diff) |
Merge branch 'x86/numa' into x86-mm
Merge reason: Pick up x86-32 remap allocator cleanup changes - 14
commits, 3fe14ab541^..993ba1585c.
3fe14ab541: x86-32, numa: Fix failure condition check in alloc_remap()
993ba1585c: x86-32, numa: Update remap allocator comments
Scheduled NUMA init 32/64bit unification changes depend on them.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 0e406d73b2c..177db6d5b2f 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -430,6 +430,26 @@ static inline void ide_unlock_host(struct ide_host *host) | |||
430 | } | 430 | } |
431 | } | 431 | } |
432 | 432 | ||
433 | static void __ide_requeue_and_plug(struct request_queue *q, struct request *rq) | ||
434 | { | ||
435 | if (rq) | ||
436 | blk_requeue_request(q, rq); | ||
437 | if (rq || blk_peek_request(q)) { | ||
438 | /* Use 3ms as that was the old plug delay */ | ||
439 | blk_delay_queue(q, 3); | ||
440 | } | ||
441 | } | ||
442 | |||
443 | void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) | ||
444 | { | ||
445 | struct request_queue *q = drive->queue; | ||
446 | unsigned long flags; | ||
447 | |||
448 | spin_lock_irqsave(q->queue_lock, flags); | ||
449 | __ide_requeue_and_plug(q, rq); | ||
450 | spin_unlock_irqrestore(q->queue_lock, flags); | ||
451 | } | ||
452 | |||
433 | /* | 453 | /* |
434 | * Issue a new request to a device. | 454 | * Issue a new request to a device. |
435 | */ | 455 | */ |
@@ -550,28 +570,7 @@ plug_device: | |||
550 | ide_unlock_host(host); | 570 | ide_unlock_host(host); |
551 | plug_device_2: | 571 | plug_device_2: |
552 | spin_lock_irq(q->queue_lock); | 572 | spin_lock_irq(q->queue_lock); |
553 | 573 | __ide_requeue_and_plug(q, rq); | |
554 | if (rq) { | ||
555 | blk_requeue_request(q, rq); | ||
556 | blk_delay_queue(q, queue_run_ms); | ||
557 | } | ||
558 | } | ||
559 | |||
560 | void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) | ||
561 | { | ||
562 | struct request_queue *q = drive->queue; | ||
563 | unsigned long flags; | ||
564 | |||
565 | spin_lock_irqsave(q->queue_lock, flags); | ||
566 | |||
567 | if (rq) | ||
568 | blk_requeue_request(q, rq); | ||
569 | |||
570 | spin_unlock_irqrestore(q->queue_lock, flags); | ||
571 | |||
572 | /* Use 3ms as that was the old plug delay */ | ||
573 | if (rq) | ||
574 | blk_delay_queue(q, 3); | ||
575 | } | 574 | } |
576 | 575 | ||
577 | static int drive_is_ready(ide_drive_t *drive) | 576 | static int drive_is_ready(ide_drive_t *drive) |