From 363d38f24af544749b406395d8063b9dc0b53514 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Fri, 21 Dec 2012 16:43:25 +0000 Subject: [PATCH] Fix decoding of SDR SPD revision. The encoding changed with revision 1.2. git-svn-id: http://lm-sensors.org/svn/i2c-tools/branches/i2c-tools-3.1@6109 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + eeprom/decode-dimms | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index e4d172c..c97ddbc 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,7 @@ SVN HEAD Don't choke when no EEPROM is found Update manufacturer IDs Remove duplicate "ns" in SDR timings + Fix decoding of SDR SPD revision i2c-dev.h: Minimize differences with kernel flavor Move SMBus helper functions to include/i2c/smbus.h i2c-stub-from-dump: Be more tolerant on input dump format diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms index ec47e88..e28bbfd 100755 --- a/eeprom/decode-dimms +++ b/eeprom/decode-dimms @@ -597,7 +597,9 @@ sub decode_sdr_sdram($) my $temp; # SPD revision - printl("SPD Revision", $bytes->[62]); + # Starting with SPD revision 1.2, this byte is encoded in BCD + printl("SPD Revision", $bytes->[62] < 0x12 ? $bytes->[62] : + ($bytes->[62] >> 4) . "." . ($bytes->[62] & 0xf)); #size computation