From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Subject: [PATCH 10/15] ide: use IDE_TFLAG_LBA48 for REQ_TYPE_ATA_TASKFILE requests
Date: Sat, 27 Oct 2007 19:46:35 +0200 [thread overview]
Message-ID: <200710271946.35816.bzolnier@gmail.com> (raw)
* Use IDE_TFLAG_LBA48 for REQ_TYPE_ATA_TASKFILE requests in ide_end_drive_cmd()
to decide whether we need to read HOB taskfile registers.
* Update execute_drive_cmd() accordingly.
This is a preparation for the next patch which removes unnecessary writes to
HOB taskfile registers for some ATA commands.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-io.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: b/drivers/ide/ide-io.c
===================================================================
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -374,7 +374,7 @@ void ide_end_drive_cmd (ide_drive_t *dri
tf->device = hwif->INB(IDE_SELECT_REG);
tf->status = stat;
- if (drive->addressing == 1) {
+ if (args->tf_flags & IDE_TFLAG_LBA48) {
hwif->OUTB(drive->ctl|0x80, IDE_CONTROL_REG);
tf->hob_feature = hwif->INB(IDE_FEATURE_REG);
tf->hob_nsect = hwif->INB(IDE_NSECTOR_REG);
@@ -872,13 +872,15 @@ static ide_startstop_t execute_drive_cmd
}
task->tf_flags |= IDE_TFLAG_OUT_DEVICE;
+ if (drive->addressing == 1)
+ task->tf_flags |= IDE_TFLAG_LBA48;
if (task->tf_flags & IDE_TFLAG_FLAGGED)
return flagged_taskfile(drive, task);
task->tf_flags |= IDE_TFLAG_OUT_TF;
- if (drive->addressing == 1)
- task->tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_OUT_HOB);
+ if (task->tf_flags & IDE_TFLAG_LBA48)
+ task->tf_flags |= IDE_TFLAG_OUT_HOB;
return do_rw_taskfile(drive, task);
}
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.35816.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.