diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/host/phosphor-host-postd/0001-Avoid-negated-postcode-write-to-D-Bus.patch')
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-phosphor/host/phosphor-host-postd/0001-Avoid-negated-postcode-write-to-D-Bus.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/host/phosphor-host-postd/0001-Avoid-negated-postcode-write-to-D-Bus.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/host/phosphor-host-postd/0001-Avoid-negated-postcode-write-to-D-Bus.patch new file mode 100644 index 000000000..37b57fd11 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/host/phosphor-host-postd/0001-Avoid-negated-postcode-write-to-D-Bus.patch @@ -0,0 +1,55 @@ +From c931dfac478b3ac045a399ca372ddef847bcf9dd Mon Sep 17 00:00:00 2001 +From: AppaRao Puli <apparao.puli@linux.intel.com> +Date: Mon, 21 Dec 2020 01:00:28 +0530 +Subject: [PATCH] Avoid negated postcode write to D-Bus + +This commit removes the code which writes the negated +postcode value to D-Bus object. This has some side effects +when bombarded data pushed to port 80. + +With this change, if same post code is written on LPC channel +it will be set but D-Bus will not emit the 'PropertiesChanged' +signal. Actually there is no need to emit the signal if actual +property value(postcode) is not changed. + +So if post code is changes, D-Bus will emit the signal as usual +with this code. Any client applications depends on this, still +can register for signal for knowing postcode change. + +Tested: + - Manually verified setting different post code emits the signal. + + busctl set-property xyz.openbmc_project.State.Boot.Raw + /xyz/openbmc_project/state/boot/raw xyz.openbmc_project.State.Boot.Raw + Value t 00 + + dbus-monitor --system "type='signal',member='PropertiesChanged', + interface='org.freedesktop.DBus.Properties', + path_namespace=/xyz/openbmc_project/state/boot/raw, + arg0=xyz.openbmc_project.State.Boot.Raw" + + - Verified functionality with real post code changes. + +Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> +--- + main.cpp | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/main.cpp b/main.cpp +index 1094e43..5d5d923 100644 +--- a/main.cpp ++++ b/main.cpp +@@ -62,10 +62,6 @@ void PostCodeEventHandler(sdeventplus::source::IO& s, int postFd, uint32_t, + { + fprintf(stderr, "Code: 0x%" PRIx64 "\n", code); + } +- // HACK: Always send property changed signal even for the same code +- // since we are single threaded, external users will never see the +- // first value. +- reporter->value(~code, true); + reporter->value(code); + + // read depends on old data being cleared since it doens't always read +-- +2.7.4 + |