ipmi: allow dynamic BMC version information
authorJeremy Kerr <jk@ozlabs.org>
Fri, 25 Aug 2017 07:47:24 +0000 (15:47 +0800)
committerCorey Minyard <cminyard@mvista.com>
Wed, 27 Sep 2017 21:03:45 +0000 (16:03 -0500)
commitaa9c9ab2443e3b9562c6c7cfc245a9e43b557d14
tree99bf8d6bf8385dbdd62b435ef88de27d119b97fd
parent68e7e50f195f34d0d539282779cad073d999192b
ipmi: allow dynamic BMC version information

Currently, it's up to the IPMI SMIs to provide the product & version
details of BMCs behind registered IPMI SMI interfaces. This device ID is
provided on SMI regsitration, and kept around for all future queries.

However, this version information isn't always static. For example, a
BMC may be upgraded at runtime, making the old version information
stale.

This change allows querying the BMC device ID & version information
dynamically. If no static device_id argument is provided to
ipmi_register_smi, then the IPMI core code will perform a Get Device ID
IPMI command to query the version information when needed. We keep a
short-term cache of this information so we don't need to re-query
for every attribute access.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
I basically rewrote this, I fixed some locking issues and simplified
things.  Same functional change, though.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_msghandler.c