提交 0a41e90b 编写于 作者: J Jens Axboe

ide-cd: convert to blk_delay_queue() for a short pause

It was always abuse to reuse the plugging infrastructure for this,
convert it to the (new) real API for delaying queueing a bit.
Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
Acked-by: NDavid S. Miller <davem@davemloft.net>
上级 3cca6dc1
...@@ -258,17 +258,10 @@ static int ide_cd_breathe(ide_drive_t *drive, struct request *rq) ...@@ -258,17 +258,10 @@ static int ide_cd_breathe(ide_drive_t *drive, struct request *rq)
if (time_after(jiffies, info->write_timeout)) if (time_after(jiffies, info->write_timeout))
return 0; return 0;
else { else {
struct request_queue *q = drive->queue;
unsigned long flags;
/* /*
* take a breather relying on the unplug timer to kick us again * take a breather
*/ */
blk_delay_queue(drive->queue, 1);
spin_lock_irqsave(q->queue_lock, flags);
blk_plug_device(q);
spin_unlock_irqrestore(q->queue_lock, flags);
return 1; return 1;
} }
} }
...@@ -1514,8 +1507,6 @@ static int ide_cdrom_setup(ide_drive_t *drive) ...@@ -1514,8 +1507,6 @@ static int ide_cdrom_setup(ide_drive_t *drive)
blk_queue_dma_alignment(q, 31); blk_queue_dma_alignment(q, 31);
blk_queue_update_dma_pad(q, 15); blk_queue_update_dma_pad(q, 15);
q->unplug_delay = max((1 * HZ) / 1000, 1);
drive->dev_flags |= IDE_DFLAG_MEDIA_CHANGED; drive->dev_flags |= IDE_DFLAG_MEDIA_CHANGED;
drive->atapi_flags = IDE_AFLAG_NO_EJECT | ide_cd_flags(id); drive->atapi_flags = IDE_AFLAG_NO_EJECT | ide_cd_flags(id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册