diff options
author | khali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0> | 2012-12-20 19:43:51 +0000 |
---|---|---|
committer | khali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0> | 2012-12-20 19:43:51 +0000 |
commit | c0d7b567f0d6b79b1a9ea10a004c59d555697c64 (patch) | |
tree | 6ed2e34d1542a7af6397031321ff5bbadec0c24f | |
parent | 57aea303a45aec4f6fee25bbf02e1c068a2b24c9 (diff) | |
download | i2c-tools-c0d7b567f0d6b79b1a9ea10a004c59d555697c64.tar.gz |
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
-rw-r--r-- | CHANGES | 1 | ||||
-rwxr-xr-x | eeprom/decode-dimms | 9 |
2 files changed, 7 insertions, 3 deletions
@@ -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(@) |