diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-01-07 21:40:08 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-01-07 21:43:56 +0300 |
commit | 820013481a115100d5f8f22dc01aac8cc0363a23 (patch) | |
tree | 99cd46b66d5b9b97d38265d553f4fb60fee0d6a2 /meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host | |
parent | 965a056096e5e043748da8766fa50cb7afedb608 (diff) | |
download | openbmc-820013481a115100d5f8f22dc01aac8cc0363a23.tar.xz |
Update to internal 2020-01-07
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host')
2 files changed, 131 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Fixed-issue-in-setLan-command-for-IP-source.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Fixed-issue-in-setLan-command-for-IP-source.patch new file mode 100644 index 000000000..6f080a4f4 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Fixed-issue-in-setLan-command-for-IP-source.patch @@ -0,0 +1,62 @@ +From 12ebdc2d53a18d286e34abf0f1553ca423ca6ca5 Mon Sep 17 00:00:00 2001 +From: Rajashekar Gade Reddy <raja.sekhar.reddy.gade@linux.intel.com> +Date: Wed, 18 Dec 2019 12:01:36 +0530 +Subject: [PATCH] Fixed issue in setLan command for IP source. + +Issue: returns success completion code for multiple requests which +is not correct as per IPMI spec. + +Fix: Added proper conditional checks + +Tested: +//IP Address Source: 0x0 (unspecified) +ipmitool -I lanplus -U root -P 0penBmc -H <ip_addr> raw 0x0c 0x01 0x03 0x04 0x0 +0xCC// Invalid data field in request + +//IP Address Source: 0x1 (static address) +ipmitool -I lanplus -U root -P 0penBmc -H <ip_addr> raw 0x0c 0x01 0x03 0x04 0x1 +0x00 //Success + +//IP Address Source: 0x2 (address obtained by BMC running DHCP) +ipmitool -I lanplus -U root -P 0penBmc -H <ip_addr> raw 0x0c 0x01 0x03 0x04 0x2 +0x00 //Success + +//IP Address Source: 0x3 (address loaded by the BIOS or system software) +ipmitool -I lanplus -U root -P 0penBmc -H <ip_addr> raw 0x0c 0x01 0x03 0x04 0x3 +0xCC// Invalid data field in request + +//IP Address Source: 0x4 (address obtained by BMC running other address assignment protocol) +ipmitool -I lanplus -U root -P 0penBmc -H <ip_addr> raw 0x0c 0x01 0x03 0x04 0x4 +0xCC// Invalid data field in request + +ipmitool -I lanplus -U root -P 0penBmc -H <ip_addr> raw 0x0c 0x01 0x03 0x04 0x5 +0x80 // param not supported + +Signed-off-by: Rajashekar Gade Reddy <raja.sekhar.reddy.gade@linux.intel.com> + +%% original patch: 0002-Fixed-issue-in-setLan-command-for-IP-source.patch +--- + transporthandler.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/transporthandler.cpp b/transporthandler.cpp +index 7407396..2df3e45 100644 +--- a/transporthandler.cpp ++++ b/transporthandler.cpp +@@ -1453,9 +1453,12 @@ RspType<> setLan(uint4_t channelBits, uint4_t, uint8_t parameter, + return responseSuccess(); + } + case IPSrc::Unspecified: +- case IPSrc::Static: + case IPSrc::BIOS: + case IPSrc::BMC: ++ { ++ return responseInvalidFieldRequest(); ++ } ++ case IPSrc::Static: + { + channelCall<setDHCPProperty>(channel, dhcpoff); + return responseSuccess(); +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Fix-for-return-CC-in-setLan-command-cases.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Fix-for-return-CC-in-setLan-command-cases.patch new file mode 100644 index 000000000..bab451f32 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Fix-for-return-CC-in-setLan-command-cases.patch @@ -0,0 +1,69 @@ +From 8b3cb6842746d43c0cab3d32821dc5239768642f Mon Sep 17 00:00:00 2001 +From: "Joshi, Mansi" <mansi.joshi@linux.intel.com> +Date: Wed, 18 Dec 2019 15:10:25 +0530 +Subject: [PATCH] Fix for return CC in setLan command cases + +Issue: When DHCP is enabled, setting ip and setting subnet mask returns +completion code 0xff. Setting default gateway returns 0x00. + +Fix: Returns CC 0xd5 because this parameter is R/W. It is only unable +to be updated because the current state blocks it (i.e. 0xd5). + +Tested: +ipmitool raw 0x0c 0x01 0x03 0x03 0x00 0x00 0x00 0x00 //setting ip +0xd5 //Command, or request parameter, not supported in present state. + +ipmitool raw 0x0c 0x01 0x03 0x06 0xff 0xff 0xf0 0x00 //subnet mask +0xd5 //Command, or request parameter, not supported in present state. + +ipmitool raw 0x0c 0x01 0x03 0x0c 0x0a 0xfe 0xef 0x77 //default gateway +0xd5 //Command, or request parameter, not supported in present state. + +%% original patch: 0065-Fix-for-return-CC-in-setLan-command-cases.patch +--- + transporthandler.cpp | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/transporthandler.cpp b/transporthandler.cpp +index 7407396..7b9ff3d 100644 +--- a/transporthandler.cpp ++++ b/transporthandler.cpp +@@ -1423,6 +1423,11 @@ RspType<> setLan(uint4_t channelBits, uint4_t, uint8_t parameter, + } + case LanParam::IP: + { ++ std::string dhcp = channelCall<getDHCPProperty>(channel); ++ if ((dhcp == dhcpv4) || (dhcp == dhcpv4v6)) ++ { ++ return responseCommandNotAvailable(); ++ } + in_addr ip; + std::array<uint8_t, sizeof(ip)> bytes; + if (req.unpack(bytes) != 0 || !req.fullyUnpacked()) +@@ -1477,6 +1482,11 @@ RspType<> setLan(uint4_t channelBits, uint4_t, uint8_t parameter, + } + case LanParam::SubnetMask: + { ++ std::string dhcp = channelCall<getDHCPProperty>(channel); ++ if ((dhcp == dhcpv4) || (dhcp == dhcpv4v6)) ++ { ++ return responseCommandNotAvailable(); ++ } + in_addr netmask; + std::array<uint8_t, sizeof(netmask)> bytes; + if (req.unpack(bytes) != 0 || !req.fullyUnpacked()) +@@ -1490,6 +1500,11 @@ RspType<> setLan(uint4_t channelBits, uint4_t, uint8_t parameter, + } + case LanParam::Gateway1: + { ++ std::string dhcp = channelCall<getDHCPProperty>(channel); ++ if ((dhcp == dhcpv4) || (dhcp == dhcpv4v6)) ++ { ++ return responseCommandNotAvailable(); ++ } + in_addr gateway; + std::array<uint8_t, sizeof(gateway)> bytes; + if (req.unpack(bytes) != 0 || !req.fullyUnpacked()) +-- +2.7.4 + |