summaryrefslogtreecommitdiff
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-18 17:07:43 (GMT)
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-18 17:07:43 (GMT)
commitd5381e42f64ca19f05c5799ffae5708acb6ed411 (patch)
tree8b5e757a9847047102c475c6c583afc191d02e5b /drivers/ide/ide-io.c
parentf030d60b30855e18ac5bf080fa9e576147623d18 (diff)
parentb3c27b51db9112d03864fdef44fa611dd69c1425 (diff)
downloadlinux-fsl-qoriq-d5381e42f64ca19f05c5799ffae5708acb6ed411.tar.xz
ASoC: Merge branch 'for-2.6.39' into for-2.6.40
Fix trivial conflict caused by silly spelling fix patch. Conflicts: sound/soc/codecs/wm8994.c
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 0e406d73..177db6d 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)
}
}
+static void __ide_requeue_and_plug(struct request_queue *q, struct request *rq)
+{
+ if (rq)
+ blk_requeue_request(q, rq);
+ if (rq || blk_peek_request(q)) {
+ /* Use 3ms as that was the old plug delay */
+ blk_delay_queue(q, 3);
+ }
+}
+
+void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq)
+{
+ struct request_queue *q = drive->queue;
+ unsigned long flags;
+
+ spin_lock_irqsave(q->queue_lock, flags);
+ __ide_requeue_and_plug(q, rq);
+ spin_unlock_irqrestore(q->queue_lock, flags);
+}
+
/*
* Issue a new request to a device.
*/
@@ -550,28 +570,7 @@ plug_device:
ide_unlock_host(host);
plug_device_2:
spin_lock_irq(q->queue_lock);
-
- if (rq) {
- blk_requeue_request(q, rq);
- blk_delay_queue(q, queue_run_ms);
- }
-}
-
-void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq)
-{
- struct request_queue *q = drive->queue;
- unsigned long flags;
-
- spin_lock_irqsave(q->queue_lock, flags);
-
- if (rq)
- blk_requeue_request(q, rq);
-
- spin_unlock_irqrestore(q->queue_lock, flags);
-
- /* Use 3ms as that was the old plug delay */
- if (rq)
- blk_delay_queue(q, 3);
+ __ide_requeue_and_plug(q, rq);
}
static int drive_is_ready(ide_drive_t *drive)