summaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_ssif.c
Commit message (Collapse)AuthorAgeFilesLines
* ipmi_ssif: use setup_timerGeliang Tang2017-04-071-3/+2
| | | | | | | Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Fix kernel panic at ipmi_ssif_thread()Joeseph Chang2017-04-071-1/+3
| | | | | | | | | | | | | msg_written_handler() may set ssif_info->multi_data to NULL when using ipmitool to write fru. Before setting ssif_info->multi_data to NULL, add new local pointer "data_to_send" and store correct i2c data pointer to it to fix NULL pointer kernel panic and incorrect ssif_info->multi_pos. Signed-off-by: Joeseph Chang <joechang@codeaurora.org> Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: stable@vger.kernel.org # 3.19-
* ipmi: Pick up slave address from SMBIOS on an ACPI deviceCorey Minyard2016-11-241-2/+31
| | | | | | | | | | When added by ACPI, the information does not contain the slave address of the BMC. However, that information is available from SMBIOS. So if we add a device that doesn't have a slave address, look at the other devices that are duplicate interfaces and see if they have a slave address. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_ssif: Remove an unused module parameterCorey Minyard2016-11-071-4/+0
| | | | Signed-off-by: Corey Minyard <cminyard@mvista.com>
* i2c: add a protocol parameter to the alert callbackBenjamin Tissoires2016-06-171-1/+5
| | | | | | | | | | | | | | | | | | .alert() is meant to be generic, but there is currently no way for the device driver to know which protocol generated the alert. Add a parameter in .alert() to help the device driver to understand what is given in data. This patch is required to have the support of SMBus Host Notify protocol through .alert(). Tested-by: Andrew Duggan <aduggan@synaptics.com> For hwmon: Acked-by: Guenter Roeck <linux@roeck-us.net> For IPMI: Acked-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* ipmi: Fix the I2C address extraction from SPMI tablesCorey Minyard2016-05-161-1/+1
| | | | | | | | | 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 <singhsan@codeaurora.org> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_ssif: Fix logic around alert handlingCorey Minyard2016-03-181-9/+4
| | | | | | | There was a mistake in the logic, if an alert came in very quickly it would hang the driver. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* char: ipmi: Drop owner assignment from i2c_driverKrzysztof Kozlowski2016-01-121-1/+0
| | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
* char: ipmi: ipmi_ssif: Replace timeval with timespec64Amitoj Kaur Chawla2015-10-241-4/+5
| | | | | | | | | | | | | | | | This patch replaces timeval with timespec64 as 32 bit 'struct timeval' will not give current time beyond 2038. The patch changes the code to use ktime_get_real_ts64() which returns a 'struct timespec64' instead of do_gettimeofday() which returns a 'struct timeval' This patch also alters the format string in pr_info() for now.tv_sec to incorporate 'long long' on 32 bit architectures. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ipmi:ssif: Add a module parm to specify that SMBus alerts don't workCorey Minyard2015-09-031-0/+8
| | | | | | | They are broken on some platforms, this gives people a chance to work around it until the firmware is fixed. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: constify SSIF ACPI device idsMathias Krause2015-09-031-1/+1
| | | | | | | | Constify the ACPI device ID array, it doesn't need to be writable at runtime. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* char:ipmi - Change 1 to true for bool type variables during initialization.Shailendra Verma2015-09-031-2/+2
| | | | | Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Fix multi-part message handlingCorey Minyard2015-05-051-13/+38
| | | | | | | | | | | | | | | | | | Lots of little fixes for multi-part messages: The values was not being re-initialized, if something went wrong handling a multi-part message and it got left in a bad state, it might be an issue. The commands were not correct when issuing multi-part reads, the code was not passing in the proper value for commands. Also clean up some minor formatting issues. Get the block number from the right location, limit the maximum send message size to 63 bytes and explain why, and fix some minor sylistic issues. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Add alert handling to SSIFCorey Minyard2015-05-051-16/+116
| | | | | | | | | | | The SSIF interface can optionally have an SMBus alert come in when data is ready. Unfortunately, the IPMI spec gives wiggle room to the implementer to allow them to always have the alert enabled, even if the driver doesn't enable it. So implement alerts. If you don't in this situation, the SMBus alert handling will constantly complain. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Remove unused including <linux/version.h>Wei Yongjun2015-05-051-1/+0
| | | | | | | Remove including <linux/version.h> that don't need it. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Remove incorrect use of seq_has_overflowedJoe Perches2015-05-051-1/+1
| | | | | | | | | | | | | | | | commit d6c5dc18d863 ("ipmi: Remove uses of return value of seq_printf") incorrectly changed the return value of various proc_show functions to use seq_has_overflowed(). These functions should return 0 on completion rather than 1/true on overflow. 1 is the same as #define SEQ_SKIP which would cause the output to not be emitted (skipped) instead. This is a logical defect only as the length of these outputs are all smaller than the initial allocation done by the seq filesystem. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi:ssif: Ignore spaces when comparing I2C adapter namesCorey Minyard2015-05-051-3/+22
| | | | | | | | Some of the adapters have spaces in their names, but that's really hard to pass in as a module or kernel parameters. So ignore the spaces. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_ssif: Fix the logic on user-supplied addressesCorey Minyard2015-05-051-1/+1
| | | | | | Returning zero is success. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi_ssif: Use interruptible completion for waiting in the threadCorey Minyard2015-04-101-3/+5
| | | | | | | The code was using an normal completion, but that caused stuck task errors after a while. Use an interruptible one to avoid that. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Remove uses of return value of seq_printfJoe Perches2015-02-191-1/+3
| | | | | | | | | The seq_printf like functions will soon be changed to return void. Convert these uses to check seq_has_overflowed instead. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* char: ipmi: Remove obsolete cleanup for clientdataWolfram Sang2015-02-191-2/+0
| | | | | | | | A few new i2c-drivers came into the kernel which clear the clientdata-pointer on exit or error. This is obsolete meanwhile, the core will do it. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Fix compile warning with tv_usecCorey Minyard2014-12-301-1/+2
| | | | | | It's not a long int on all arches. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Fix compile issue with isspace()Corey Minyard2014-12-211-0/+1
| | | | | | | Some arches don't get ctypes.h included from these includes, so add it explicitly. Signed-off-by: Corey Minyard <cminyard@mvista.com>
* ipmi: Add SMBus interface driver (SSIF)Corey Minyard2014-12-111-0/+1870
This patch adds the SMBus interface to the IPMI driver. Signed-off-by: Corey Minyard <minyard@acm.org> Documentation/IPMI.txt | 32 drivers/char/ipmi/Kconfig | 11 drivers/char/ipmi/Makefile | 1 drivers/char/ipmi/ipmi_smb.c | 1737 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1769 insertions(+), 12 deletions(-)
OpenPOWER on IntegriCloud