diff --git a/smartmontools/CHANGELOG b/smartmontools/CHANGELOG
index 07cb6e6531779826ba9cd11db88d8fe11db29b5c..46dcf74ecab8cdc685f62cac4e7d5ee3b2d027ca 100644
--- a/smartmontools/CHANGELOG
+++ b/smartmontools/CHANGELOG
@@ -43,6 +43,9 @@ NOTES FOR FUTURE RELEASES: see TODO file.
 
 <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
 
+  [CF] Add '-v ID,raw64[,...]' print format based on an patch provided
+       by Marcin Marszalek.
+
   [CF] Add '-v ID,RAW_FORMAT[,ATTR_NAME]' option. This allows to add new
        attributes without the need to enhance the '-v' option.
        Rework attribute name and raw value formatting.
diff --git a/smartmontools/atacmds.cpp b/smartmontools/atacmds.cpp
index 37698d6400863e6774cd2c5b1d1ee798a2ec0fc5..b567f3f999745f0bf0c3e8b3366cf74396f49445 100644
--- a/smartmontools/atacmds.cpp
+++ b/smartmontools/atacmds.cpp
@@ -196,6 +196,7 @@ const format_name_entry format_names[] = {
   {"raw8"           , RAWFMT_RAW8},
   {"raw16"          , RAWFMT_RAW16},
   {"raw48"          , RAWFMT_RAW48},
+  {"raw64"          , RAWFMT_RAW64},
   {"raw16(raw16)"   , RAWFMT_RAW16_OPT_RAW16},
   {"raw16(avg16)"   , RAWFMT_RAW16_OPT_AVG16},
   {"raw24/raw24"    , RAWFMT_RAW24_RAW24},
@@ -1832,6 +1833,16 @@ std::string ata_format_attr_raw_value(const ata_smart_attribute & attribute,
     s = strprintf("%"PRIu64, rawvalue);
     break;
 
+  case RAWFMT_RAW64:
+    // Some SSD vendors use bytes 3-10 from the Attribute
+    // Data Structure to store a 64-bit raw value.
+    rawvalue <<= 8;
+    rawvalue |= attribute.worst;
+    rawvalue <<= 8;
+    rawvalue |= attribute.current;
+    s = strprintf("%"PRIu64, rawvalue);
+    break;
+
   case RAWFMT_RAW16_OPT_RAW16:
     s = strprintf("%u", word[0]);
     if (word[1] || word[2])
diff --git a/smartmontools/atacmds.h b/smartmontools/atacmds.h
index 7c02c3a244653454fac0c38cc00621db293e4481..746b66cbd75bb3cb4debc7e475a16812a2d6b39b 100644
--- a/smartmontools/atacmds.h
+++ b/smartmontools/atacmds.h
@@ -641,6 +641,7 @@ enum ata_attr_raw_format
   RAWFMT_RAW8,
   RAWFMT_RAW16,
   RAWFMT_RAW48,
+  RAWFMT_RAW64,
   RAWFMT_RAW16_OPT_RAW16,
   RAWFMT_RAW16_OPT_AVG16,
   RAWFMT_RAW24_RAW24,