Skip to content

Commit 0a41e90

Browse files
author
Jens Axboe
committed
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: Jens Axboe <[email protected]> Acked-by: David S. Miller <[email protected]>
1 parent 3cca6dc commit 0a41e90

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

drivers/ide/ide-cd.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -258,17 +258,10 @@ static int ide_cd_breathe(ide_drive_t *drive, struct request *rq)
258258
if (time_after(jiffies, info->write_timeout))
259259
return 0;
260260
else {
261-
struct request_queue *q = drive->queue;
262-
unsigned long flags;
263-
264261
/*
265-
* take a breather relying on the unplug timer to kick us again
262+
* take a breather
266263
*/
267-
268-
spin_lock_irqsave(q->queue_lock, flags);
269-
blk_plug_device(q);
270-
spin_unlock_irqrestore(q->queue_lock, flags);
271-
264+
blk_delay_queue(drive->queue, 1);
272265
return 1;
273266
}
274267
}
@@ -1514,8 +1507,6 @@ static int ide_cdrom_setup(ide_drive_t *drive)
15141507
blk_queue_dma_alignment(q, 31);
15151508
blk_queue_update_dma_pad(q, 15);
15161509

1517-
q->unplug_delay = max((1 * HZ) / 1000, 1);
1518-
15191510
drive->dev_flags |= IDE_DFLAG_MEDIA_CHANGED;
15201511
drive->atapi_flags = IDE_AFLAG_NO_EJECT | ide_cd_flags(id);
15211512

0 commit comments

Comments
 (0)