diff options
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r-- | drivers/ide/ide-disk.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 01846f244b40..65c499aab664 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -686,14 +686,13 @@ static int set_addressing(ide_drive_t *drive, int arg) | |||
686 | if (arg < 0 || arg > 2) | 686 | if (arg < 0 || arg > 2) |
687 | return -EINVAL; | 687 | return -EINVAL; |
688 | 688 | ||
689 | drive->addressing = 0; | 689 | if (arg && ((drive->hwif->host_flags & IDE_HFLAG_NO_LBA48) || |
690 | 690 | ata_id_lba48_enabled(drive->id) == 0)) | |
691 | if (drive->hwif->host_flags & IDE_HFLAG_NO_LBA48) | ||
692 | return 0; | ||
693 | |||
694 | if (ata_id_lba48_enabled(drive->id) == 0) | ||
695 | return -EIO; | 691 | return -EIO; |
696 | 692 | ||
693 | if (arg == 2) | ||
694 | arg = 0; | ||
695 | |||
697 | drive->addressing = arg; | 696 | drive->addressing = arg; |
698 | 697 | ||
699 | return 0; | 698 | return 0; |