]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ipmi:ssif: Add support for multi-part transmit messages > 2 parts
authorCorey Minyard <cminyard@mvista.com>
Thu, 25 Oct 2018 15:04:52 +0000 (10:04 -0500)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Fri, 9 Nov 2018 18:59:56 +0000 (16:59 -0200)
commit11fb71f8b04a0a6f838870424004579f8857d3b7
treeb6a37066f0d42b4ddac82c55d09959f6f4a4aa43
parentdbe225f2873a8789792a96542596e7c1ce8e0a53
ipmi:ssif: Add support for multi-part transmit messages > 2 parts

The spec was fairly confusing about how multi-part transmit messages
worked, so the original implementation only added support for two
part messages.  But after talking about it with others and finding
something I missed, I think it makes more sense.

The spec mentions smbus command 8 in a table at the end of the
section on SSIF support as the end transaction.  If that works,
then all is good and as it should be.  However, some implementations
seem to use a middle transaction <32 bytes tomark the end because of the
confusion in the spec, even though that is an SMBus violation if
the number of bytes is zero.

So this change adds some tests, if command=8 works, it uses that,
otherwise if an empty end transaction works, it uses a middle
transaction <32 bytes to mark the end.  If neither works, then
it limits the size to 63 bytes as it is now.

BugLink: https://bugs.launchpad.net/bugs/1799794
Cc: Harri Hakkarainen <harri@cavium.com>
Cc: Bazhenov, Dmitry <dmitry.bazhenov@auriga.com>
Cc: Mach, Dat <Dat.Mach@cavium.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
(cherry picked from commit 10042504ed92c06077b8a20a4edd67ba784847d4)
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Acked-by: Kleber Souza <kleber.souza@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/char/ipmi/ipmi_ssif.c