From: Zdenek S. <st...@us...> - 2016-08-31 17:36:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "ipmitool". The branch, master has been updated via 052655cd91e9173e43c4540737d52d031a7a9046 (commit) via fa2c1550b9e36c4ecd6aa27446df34cec56f4001 (commit) from 51198a17490e5c81f675fee9a4bb042de65a7a96 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 052655cd91e9173e43c4540737d52d031a7a9046 Author: B BALAJI SINGH <b_b...@de...> Date: Tue Aug 30 03:05:46 2016 -0400 ID:456 - Unable to disable the VLAN ID using ipmitool Currently, when a LAN parameter set command is sent through ipmitool, the corresponding parameter data is requested and compared to the command to verify that the data was written correctly. Since we do send the VLAN ID in this return data, regardless of whether VLAN is disabled or not, this mismatch between requested and received parameters causes ipmitool to retry the command 10 times and return an error. ipmitool is sending "0x00 0x00" reading back data from BMC as "0x01 0x00" which is NOT matching & hence pops up the error /warning "LAN Parameter Data does not match! Write may have failed." After 10 retries when we check "ipmitool lan print" VLAN ID is disabled successfully. diff --git a/lib/ipmi_lanp.c b/lib/ipmi_lanp.c index 16a3a3e..65d881b 100644 --- a/lib/ipmi_lanp.c +++ b/lib/ipmi_lanp.c @@ -1204,12 +1204,27 @@ get_cmdline_ipaddr(char * arg, uint8_t * buf) static int ipmi_lan_set_vlan_id(struct ipmi_intf *intf, uint8_t chan, char *string) { + struct lan_param *p; uint8_t data[2]; int rc; if (string == NULL) { - data[0] = 0; - data[1] = 0; + lprintf(LOG_DEBUG, "Get current VLAN ID from BMC."); + p = get_lan_param(intf, chan, IPMI_LANP_VLAN_ID); + if (p != NULL && p->data != NULL && p->data_len > 1) { + int id = ((p->data[1] & 0x0f) << 8) + p->data[0]; + if (id < 1 || id > 4094) { + lprintf(LOG_ERR, + "Retrieved VLAN ID %i is out of range <1..4094>.", + id); + return (-1); + } + data[0] = p->data[0]; + data[1] = p->data[1] & 0x0F; + } else { + data[0] = 0; + data[1] = 0; + } } else { int id = 0; commit fa2c1550b9e36c4ecd6aa27446df34cec56f4001 Author: Dmitry Rakhchev <rd...@pi...> Date: Fri Aug 26 23:08:16 2016 +0300 ID: 459 - Fix reading FRU on Artesyn (Emerson) shelf manager, MF105. Treat 0xC7 as an indication that requested data length in the FRU read shall be decreased. diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c index 9a6fc6c..cf00eff 100644 --- a/lib/ipmi_fru.c +++ b/lib/ipmi_fru.c @@ -684,9 +684,9 @@ read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id, break; } if (rsp->ccode > 0) { - /* if we get C8h or CAh completion code then we requested too + /* if we get C7h or C8h or CAh return code then we requested too * many bytes at once so try again with smaller size */ - if ((rsp->ccode == 0xc8 || rsp->ccode == 0xca) + if ((rsp->ccode == 0xc7 || rsp->ccode == 0xc8 || rsp->ccode == 0xca) && fru->max_read_size > 8) { if (fru->max_read_size > 32) { /* subtract read length more aggressively */ ----------------------------------------------------------------------- Summary of changes: lib/ipmi_fru.c | 4 ++-- lib/ipmi_lanp.c | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) hooks/post-receive -- ipmitool |