aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/libata-core.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 4e1df5382b9a..ca67484af1eb 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -982,25 +982,28 @@ static u64 ata_hpa_resize(struct ata_device *dev)
982 hpa_sectors = ata_read_native_max_address(dev); 982 hpa_sectors = ata_read_native_max_address(dev);
983 983
984 /* if no hpa, both should be equal */ 984 /* if no hpa, both should be equal */
985 ata_dev_printk(dev, KERN_INFO, "%s 1: sectors = %lld, hpa_sectors = %lld\n", 985 ata_dev_printk(dev, KERN_INFO, "%s 1: sectors = %lld, "
986 __FUNCTION__, sectors, hpa_sectors); 986 "hpa_sectors = %lld\n",
987 __FUNCTION__, (long long)sectors, (long long)hpa_sectors);
987 988
988 if (hpa_sectors > sectors) { 989 if (hpa_sectors > sectors) {
989 ata_dev_printk(dev, KERN_INFO, 990 ata_dev_printk(dev, KERN_INFO,
990 "Host Protected Area detected:\n" 991 "Host Protected Area detected:\n"
991 "\tcurrent size: %lld sectors\n" 992 "\tcurrent size: %lld sectors\n"
992 "\tnative size: %lld sectors\n", 993 "\tnative size: %lld sectors\n",
993 sectors, hpa_sectors); 994 (long long)sectors, (long long)hpa_sectors);
994 995
995 if (ata_ignore_hpa) { 996 if (ata_ignore_hpa) {
996 if (ata_id_has_lba48(dev->id)) 997 if (ata_id_has_lba48(dev->id))
997 hpa_sectors = ata_set_native_max_address_ext(dev, hpa_sectors); 998 hpa_sectors = ata_set_native_max_address_ext(dev, hpa_sectors);
998 else 999 else
999 hpa_sectors = ata_set_native_max_address(dev, hpa_sectors); 1000 hpa_sectors = ata_set_native_max_address(dev,
1001 hpa_sectors);
1000 1002
1001 if (hpa_sectors) { 1003 if (hpa_sectors) {
1002 ata_dev_printk(dev, KERN_INFO, 1004 ata_dev_printk(dev, KERN_INFO, "native size "
1003 "native size increased to %lld sectors\n", hpa_sectors); 1005 "increased to %lld sectors\n",
1006 (long long)hpa_sectors);
1004 return hpa_sectors; 1007 return hpa_sectors;
1005 } 1008 }
1006 } 1009 }