From f31e1d7fa727419cb6967893e3fe502164b36411 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 20 Dec 2012 19:43:51 +0000 Subject: [PATCH] If DDR3 manufacturer page count parity is wrong, still print the manufacturer name (if valid) but add a question mark. git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@6097 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + eeprom/decode-dimms | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 68f7b18..e7360ce 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,7 @@ SVN HEAD Don't print undefined DDR2 SDRAM timings Print DDR and DDR2 core timings for all standard speeds Update manufacturer IDs + Make DDR3 manufacturer count parity error non-fatal i2cdetect: Do a best effort detection if functionality is missing i2c-dev.h: Minimize differences with kernel flavor Move SMBus helper functions to include/i2c/smbus.h diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms index 1f931bc..b445880 100755 --- a/eeprom/decode-dimms +++ b/eeprom/decode-dimms @@ -337,10 +337,13 @@ sub parity($) sub manufacturer_ddr3($$) { my ($count, $code) = @_; - return "Invalid" if parity($count) != 1; + my $manufacturer; + return "Invalid" if parity($code) != 1; - return (($code & 0x7F) - 1 > $vendors[$count & 0x7F]) ? "Unknown" : - $vendors[$count & 0x7F][($code & 0x7F) - 1]; + return "Unknown" if ($code & 0x7F) - 1 > $vendors[$count & 0x7F]; + $manufacturer = $vendors[$count & 0x7F][($code & 0x7F) - 1]; + $manufacturer .= "? (Invalid parity)" if parity($count) != 1; + return $manufacturer; } sub manufacturer(@)