Commit 34c27a49 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  staging: Fix bdops->check_events() misconversion in cyasblkdev_block.c
  ide: ensure that we re-run the queue handler
parents 8d49a775 0b58b4e3
...@@ -440,6 +440,7 @@ void do_ide_request(struct request_queue *q) ...@@ -440,6 +440,7 @@ void do_ide_request(struct request_queue *q)
struct ide_host *host = hwif->host; struct ide_host *host = hwif->host;
struct request *rq = NULL; struct request *rq = NULL;
ide_startstop_t startstop; ide_startstop_t startstop;
unsigned long queue_run_ms = 3; /* old plug delay */
spin_unlock_irq(q->queue_lock); spin_unlock_irq(q->queue_lock);
...@@ -459,6 +460,9 @@ void do_ide_request(struct request_queue *q) ...@@ -459,6 +460,9 @@ void do_ide_request(struct request_queue *q)
prev_port = hwif->host->cur_port; prev_port = hwif->host->cur_port;
if (drive->dev_flags & IDE_DFLAG_SLEEPING && if (drive->dev_flags & IDE_DFLAG_SLEEPING &&
time_after(drive->sleep, jiffies)) { time_after(drive->sleep, jiffies)) {
unsigned long left = jiffies - drive->sleep;
queue_run_ms = jiffies_to_msecs(left + 1);
ide_unlock_port(hwif); ide_unlock_port(hwif);
goto plug_device; goto plug_device;
} }
...@@ -547,8 +551,10 @@ void do_ide_request(struct request_queue *q) ...@@ -547,8 +551,10 @@ void do_ide_request(struct request_queue *q)
plug_device_2: plug_device_2:
spin_lock_irq(q->queue_lock); spin_lock_irq(q->queue_lock);
if (rq) if (rq) {
blk_requeue_request(q, 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) void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq)
...@@ -562,6 +568,10 @@ void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) ...@@ -562,6 +568,10 @@ void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq)
blk_requeue_request(q, rq); blk_requeue_request(q, rq);
spin_unlock_irqrestore(q->queue_lock, flags); spin_unlock_irqrestore(q->queue_lock, flags);
/* Use 3ms as that was the old plug delay */
if (rq)
blk_delay_queue(q, 3);
} }
static int drive_is_ready(ide_drive_t *drive) static int drive_is_ready(ide_drive_t *drive)
......
...@@ -1191,7 +1191,7 @@ static int cyasblkdev_add_disks(int bus_num, ...@@ -1191,7 +1191,7 @@ static int cyasblkdev_add_disks(int bus_num,
bd->user_disk_1->first_minor = (devidx + 1) << CYASBLKDEV_SHIFT; bd->user_disk_1->first_minor = (devidx + 1) << CYASBLKDEV_SHIFT;
bd->user_disk_1->minors = 8; bd->user_disk_1->minors = 8;
bd->user_disk_1->fops = &cyasblkdev_bdops; bd->user_disk_1->fops = &cyasblkdev_bdops;
bd->user_disk_0->events = DISK_EVENT_MEDIA_CHANGE; bd->user_disk_1->events = DISK_EVENT_MEDIA_CHANGE;
bd->user_disk_1->private_data = bd; bd->user_disk_1->private_data = bd;
bd->user_disk_1->queue = bd->queue.queue; bd->user_disk_1->queue = bd->queue.queue;
bd->dbgprn_flags = DBGPRN_RD_RQ; bd->dbgprn_flags = DBGPRN_RD_RQ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment