diff options
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r-- | drivers/ide/ide-disk.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 61a6d3546221..3d92c9d54d47 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -350,6 +350,9 @@ static void idedisk_check_hpa(ide_drive_t *drive) | |||
350 | capacity, sectors_to_MB(capacity), | 350 | capacity, sectors_to_MB(capacity), |
351 | set_max, sectors_to_MB(set_max)); | 351 | set_max, sectors_to_MB(set_max)); |
352 | 352 | ||
353 | if ((drive->dev_flags & IDE_DFLAG_NOHPA) == 0) | ||
354 | return; | ||
355 | |||
353 | set_max = ide_disk_hpa_set_capacity(drive, set_max, lba48); | 356 | set_max = ide_disk_hpa_set_capacity(drive, set_max, lba48); |
354 | if (set_max) | 357 | if (set_max) |
355 | printk(KERN_INFO "%s: Host Protected Area disabled.\n", | 358 | printk(KERN_INFO "%s: Host Protected Area disabled.\n", |
@@ -430,8 +433,11 @@ static u64 ide_disk_set_capacity(ide_drive_t *drive, u64 capacity) | |||
430 | goto out; | 433 | goto out; |
431 | 434 | ||
432 | set = ide_disk_hpa_set_capacity(drive, set, lba48); | 435 | set = ide_disk_hpa_set_capacity(drive, set, lba48); |
433 | if (set) | 436 | if (set) { |
437 | /* needed for ->resume to disable HPA */ | ||
438 | drive->dev_flags |= IDE_DFLAG_NOHPA; | ||
434 | return set; | 439 | return set; |
440 | } | ||
435 | out: | 441 | out: |
436 | return drive->capacity64; | 442 | return drive->capacity64; |
437 | } | 443 | } |