From: Corey Minyard Date: Fri, 6 May 2016 17:57:13 +0000 (-0500) Subject: ipmi: Fix the I2C address extraction from SPMI tables X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=70f95b76f155153a2a51a9a4568b9bcd4e573f5c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ipmi: Fix the I2C address extraction from SPMI tables Unlike everywhere else in the IPMI specification, the I2C address specified in the SPMI table is not shifted to the left one bit with the LSB zero. Instead it is not shifted with the MSB zero. Reported-by: Sanjeev Signed-off-by: Corey Minyard --- diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index 8b3be8b92573..097c86898608 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c @@ -1870,7 +1870,7 @@ static int try_init_spmi(struct SPMITable *spmi) return -EIO; } - myaddr = spmi->addr.address >> 1; + myaddr = spmi->addr.address & 0x7f; return new_ssif_client(myaddr, NULL, 0, 0, SI_SPMI); }