Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=868e672ac8db650dde695a5707a6caf5a757e7d9
Commit:     868e672ac8db650dde695a5707a6caf5a757e7d9
Parent:     807e35d695690011faa1ce3ad67dfc23c1e39bdc
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Fri Jan 25 22:17:10 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 22:17:10 2008 +0100

    ide: use IDE_TFLAG_LBA48 for REQ_TYPE_ATA_TASKFILE requests
    
    * 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 <[EMAIL PROTECTED]>
---
 drivers/ide/ide-io.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 9ffab8c..859cf7f 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -374,7 +374,7 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
                        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 (ide_drive_t 
*drive,
                }
 
                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);
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to