From a586c7c942b8d28d764347ba9a74da5c039a7966 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Tue, 24 Mar 2009 23:22:44 +0100 Subject: [PATCH] --- yaml --- r: 133372 b: refs/heads/master c: 1866082339597930c5b77aad8de34ab4fbb5724f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/ide/ide-atapi.c | 5 ++++- trunk/drivers/ide/ide-cd.c | 4 +++- trunk/drivers/ide/ide-io.c | 28 ---------------------------- trunk/include/linux/ide.h | 2 -- 5 files changed, 8 insertions(+), 33 deletions(-) diff --git a/[refs] b/[refs] index e6cafd2c49c0..58f1df29d65d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 65ca5377322c7543163066f373ae9e6b0ad8de8a +refs/heads/master: 1866082339597930c5b77aad8de34ab4fbb5724f diff --git a/trunk/drivers/ide/ide-atapi.c b/trunk/drivers/ide/ide-atapi.c index 09ae30f46070..3044c51c06a5 100644 --- a/trunk/drivers/ide/ide-atapi.c +++ b/trunk/drivers/ide/ide-atapi.c @@ -149,7 +149,10 @@ static void ide_queue_pc_head(ide_drive_t *drive, struct gendisk *disk, memcpy(rq->cmd, pc->c, 12); if (drive->media == ide_tape) rq->cmd[13] = REQ_IDETAPE_PC1; - ide_do_drive_cmd(drive, rq); + + drive->hwif->rq = NULL; + + elv_add_request(drive->queue, rq, ELEVATOR_INSERT_FRONT, 0); } /* diff --git a/trunk/drivers/ide/ide-cd.c b/trunk/drivers/ide/ide-cd.c index ddfbea41d296..2177cd11664c 100644 --- a/trunk/drivers/ide/ide-cd.c +++ b/trunk/drivers/ide/ide-cd.c @@ -242,7 +242,9 @@ static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense, ide_debug_log(IDE_DBG_SENSE, "failed_cmd: 0x%x\n", failed_command->cmd[0]); - ide_do_drive_cmd(drive, rq); + drive->hwif->rq = NULL; + + elv_add_request(drive->queue, rq, ELEVATOR_INSERT_FRONT, 0); } static void cdrom_end_request(ide_drive_t *drive, int uptodate) diff --git a/trunk/drivers/ide/ide-io.c b/trunk/drivers/ide/ide-io.c index 557b15700ea2..56be3375bee4 100644 --- a/trunk/drivers/ide/ide-io.c +++ b/trunk/drivers/ide/ide-io.c @@ -1129,34 +1129,6 @@ irqreturn_t ide_intr (int irq, void *dev_id) } EXPORT_SYMBOL_GPL(ide_intr); -/** - * ide_do_drive_cmd - issue IDE special command - * @drive: device to issue command - * @rq: request to issue - * - * This function issues a special IDE device request - * onto the request queue. - * - * the rq is queued at the head of the request queue, displacing - * the currently-being-processed request and this function - * returns immediately without waiting for the new rq to be - * completed. This is VERY DANGEROUS, and is intended for - * careful use by the ATAPI tape/cdrom driver code. - */ - -void ide_do_drive_cmd(ide_drive_t *drive, struct request *rq) -{ - struct request_queue *q = drive->queue; - unsigned long flags; - - drive->hwif->rq = NULL; - - spin_lock_irqsave(q->queue_lock, flags); - __elv_add_request(q, rq, ELEVATOR_INSERT_FRONT, 0); - spin_unlock_irqrestore(q->queue_lock, flags); -} -EXPORT_SYMBOL(ide_do_drive_cmd); - void ide_pad_transfer(ide_drive_t *drive, int write, int len) { ide_hwif_t *hwif = drive->hwif; diff --git a/trunk/include/linux/ide.h b/trunk/include/linux/ide.h index d0065a90452b..8fadffe53cde 100644 --- a/trunk/include/linux/ide.h +++ b/trunk/include/linux/ide.h @@ -1174,8 +1174,6 @@ extern ide_startstop_t ide_do_reset (ide_drive_t *); extern int ide_devset_execute(ide_drive_t *drive, const struct ide_devset *setting, int arg); -extern void ide_do_drive_cmd(ide_drive_t *, struct request *); - extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); void ide_tf_dump(const char *, struct ide_taskfile *);