mboxd/dbus: Unconditionally send BMC EVENT to host on resume

The "BMC Flash Control Lost" BMC Event (0x40) is used to signal to the
host that the daemon has been suspended, such as by mboxctl --suspend.
When resumed, such as by mboxctl --resume, the bit is cleared and this
is again communicated to the host.

When the resume command is called with clean the clearing of this bit is
communicated to the host unconditionally. However when resume is called
with modified we rely on the reset windows function to communicate this to
the host at the same time it tells the host that the active window has
been closed. However the reset windows function is only called if there
was indeed an active window. This means that when resume is called with
modified and there isn't an active window, the host is never told that
the daemon has been resumed.

Fix this by communicating the BMC event to the host unconditionally on
resume irrespective of the argument.

Reported-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Change-Id: I2e921d897476a9e34516f8929e713057ea0622a4
1 file changed
tree: 7c3cf94f722e97c78d5f4d26d901ab31d2ecacbf
  1. Documentation/
  2. m4/
  3. test/
  4. .gitignore
  5. bootstrap.sh
  6. common.c
  7. common.h
  8. configure.ac
  9. dbus.h
  10. LICENSE
  11. Makefile.am
  12. mbox.h
  13. mboxctl.c
  14. mboxd.c
  15. mboxd_dbus.c
  16. mboxd_dbus.h
  17. mboxd_flash.c
  18. mboxd_flash.h
  19. mboxd_lpc.c
  20. mboxd_lpc.h
  21. mboxd_msg.c
  22. mboxd_msg.h
  23. mboxd_windows.c
  24. mboxd_windows.h
  25. mtd.c
  26. README.md
README.md

Copyright 2017 IBM

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

MBOX

This repo contains the protocol definition for the host to BMC mailbox communication specification which can be found in Documentation/mbox_procotol.md.

There is also a reference implementation of a BMC mailbox daemon, the details of which can be found in Documentation/mboxd.md.

Finally there is also an implementation of a mailbox daemon control program, the details of which can be found in Documentation/mboxctl.md.