From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Subject: [PATCH 8/15] ide: remove ide_cmd() helper
Date: Sat, 27 Oct 2007 19:46:25 +0200 [thread overview]
Message-ID: <200710271946.25234.bzolnier@gmail.com> (raw)
* Remove ide_cmd() helper.
* Clear nIEN and call SELECT_MASK() before writing taskfile registers.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-io.c | 26 ++++++--------------------
1 file changed, 6 insertions(+), 20 deletions(-)
Index: b/drivers/ide/ide-io.c
===================================================================
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -621,25 +621,6 @@ ide_startstop_t ide_abort(ide_drive_t *d
}
/**
- * ide_cmd - issue a simple drive command
- * @drive: drive the command is for
- * @cmd: command byte
- * @handler: handler for the command completion
- *
- * Issue a simple drive command with interrupts.
- * The drive must be selected beforehand.
- */
-
-static void ide_cmd(ide_drive_t *drive, u8 cmd, ide_handler_t *handler)
-{
- ide_hwif_t *hwif = HWIF(drive);
- if (IDE_CONTROL_REG)
- hwif->OUTB(drive->ctl,IDE_CONTROL_REG); /* clear nIEN */
- SELECT_MASK(drive,0);
- ide_execute_command(drive, cmd, handler, WAIT_CMD, NULL);
-}
-
-/**
* drive_cmd_intr - drive command completion interrupt
* @drive: drive the completion interrupt occurred on
*
@@ -901,6 +882,11 @@ static ide_startstop_t execute_drive_cmd
if (args == NULL)
goto done;
+ if (IDE_CONTROL_REG)
+ hwif->OUTB(drive->ctl, IDE_CONTROL_REG); /* clear nIEN */
+
+ SELECT_MASK(drive, 0);
+
if (rq->cmd_type == REQ_TYPE_ATA_TASK) {
#ifdef DEBUG
printk("%s: DRIVE_TASK_CMD ", drive->name);
@@ -936,7 +922,7 @@ static ide_startstop_t execute_drive_cmd
hwif->OUTB(args[1], IDE_NSECTOR_REG);
}
- ide_cmd(drive, args[0], &drive_cmd_intr);
+ ide_execute_command(drive, args[0], &drive_cmd_intr, WAIT_CMD, NULL);
return ide_started;
done:
reply other threads:[~2007-10-27 17:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710271946.25234.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.