diff options
author | Richard J. Knight <rjknight@us.ibm.com> | 2015-02-27 14:42:27 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-02-28 05:37:03 -0600 |
commit | 593f09ed823fc5a2bd3cb5e0538640c7933aa147 (patch) | |
tree | 661dba07c3e49ede7fb9d9fd10771f9fe41e24ae /src/usr/ipmi | |
parent | fb95b417015157ceefb740c86c7c17b2596e9676 (diff) | |
download | talos-hostboot-593f09ed823fc5a2bd3cb5e0538640c7933aa147.tar.gz talos-hostboot-593f09ed823fc5a2bd3cb5e0538640c7933aa147.zip |
Incorrect power limit set at the OCC when using ipmi-dcmi cmds
-DCMI command sends power limit value in little endian format
so we need to byte swap it before sending to the occ.
Change-Id: Icc685a757639c087ab081db648e06fcc375de8b4
RTC:124840
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16047
Reviewed-by: Matt Spinler <spinler@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/ipmi')
-rw-r--r-- | src/usr/ipmi/ipmidcmi.C | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/usr/ipmi/ipmidcmi.C b/src/usr/ipmi/ipmidcmi.C index c32962fcc..94aee18ce 100644 --- a/src/usr/ipmi/ipmidcmi.C +++ b/src/usr/ipmi/ipmidcmi.C @@ -83,8 +83,8 @@ namespace SENSOR // byte 6:7 power limit // data[0] is pointing at byte 2 of the dcmi spec description // so our offsets will be off by two below - o_powerLimit = data[4]; - o_powerLimit = ( o_powerLimit << 8 ) + data[5]; + o_powerLimit = data[5]; + o_powerLimit = ( o_powerLimit << 8 ) + data[4]; TRACFCOMP(g_trac_ipmi,"Power limit is %d watts",o_powerLimit); TRACFCOMP(g_trac_ipmi,"Power limit is %s", ((cc) ? "not active": "active")); @@ -101,8 +101,6 @@ namespace SENSOR { o_limitActive = true; } - - delete[] data; } else { @@ -122,14 +120,16 @@ namespace SENSOR */ l_err = new ERRORLOG::ErrlEntry( - ERRORLOG::ERRL_SEV_UNRECOVERABLE, - IPMI::MOD_IPMIDCMI, - IPMI::RC_DCMI_CMD_FAILED, - static_cast<uint64_t>(cc),0, true); + ERRORLOG::ERRL_SEV_UNRECOVERABLE, + IPMI::MOD_IPMIDCMI, + IPMI::RC_DCMI_CMD_FAILED, + static_cast<uint64_t>(cc),0, true); l_err->collectTrace(IPMI_COMP_NAME); } + + delete[] data; } return l_err; |