diff options
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | 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 9ffab8c71e75..859cf7f4133f 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) | |||
374 | tf->device = hwif->INB(IDE_SELECT_REG); | 374 | tf->device = hwif->INB(IDE_SELECT_REG); |
375 | tf->status = stat; | 375 | tf->status = stat; |
376 | 376 | ||
377 | if (drive->addressing == 1) { | 377 | if (args->tf_flags & IDE_TFLAG_LBA48) { |
378 | hwif->OUTB(drive->ctl|0x80, IDE_CONTROL_REG); | 378 | hwif->OUTB(drive->ctl|0x80, IDE_CONTROL_REG); |
379 | tf->hob_feature = hwif->INB(IDE_FEATURE_REG); | 379 | tf->hob_feature = hwif->INB(IDE_FEATURE_REG); |
380 | tf->hob_nsect = hwif->INB(IDE_NSECTOR_REG); | 380 | tf->hob_nsect = hwif->INB(IDE_NSECTOR_REG); |
@@ -872,13 +872,15 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, | |||
872 | } | 872 | } |
873 | 873 | ||
874 | task->tf_flags |= IDE_TFLAG_OUT_DEVICE; | 874 | task->tf_flags |= IDE_TFLAG_OUT_DEVICE; |
875 | if (drive->addressing == 1) | ||
876 | task->tf_flags |= IDE_TFLAG_LBA48; | ||
875 | 877 | ||
876 | if (task->tf_flags & IDE_TFLAG_FLAGGED) | 878 | if (task->tf_flags & IDE_TFLAG_FLAGGED) |
877 | return flagged_taskfile(drive, task); | 879 | return flagged_taskfile(drive, task); |
878 | 880 | ||
879 | task->tf_flags |= IDE_TFLAG_OUT_TF; | 881 | task->tf_flags |= IDE_TFLAG_OUT_TF; |
880 | if (drive->addressing == 1) | 882 | if (task->tf_flags & IDE_TFLAG_LBA48) |
881 | task->tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_OUT_HOB); | 883 | task->tf_flags |= IDE_TFLAG_OUT_HOB; |
882 | 884 | ||
883 | return do_rw_taskfile(drive, task); | 885 | return do_rw_taskfile(drive, task); |
884 | } | 886 | } |