- 28 9月, 2017 11 次提交
-
-
由 Corey Minyard 提交于
Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
Instead of allocating the smi_info structure, filling in the I/O info, and passing it to ipmi_si_add_smi(), just pass the I/O info in the io structure and let ipmi_si_add_smi() allocate the smi_info structure. This required redoing the way the remove functions for some device interfaces worked, a new function named ipmi_si_remove_by_dev() allows the device to be passed in and detected instead of using driver data, which couldn't be filled out easily othersize. After this the platform handling should be decoupled from the smi_info structure and that handling can be pulled out to its own files. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
Where it belongs, and getting ready for pulling the platform handling into its own file. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
So the platform code can do it without having to access the smi info, getting ready for pulling the platform handling section to their own files. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
That's where it belongs, and we are getting ready for moving the platform handling out of the main ipmi_si_intf.c file. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
Getting ready for moving the platform-specific stuff into their own files. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
It's no longer used, dynamic device id handling is in place now. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Jeremy Kerr 提交于
Currently, ipmi_demagle_device_id requires a full response buffer in its data argument. This means we can't use it to parse a response in a struct ipmi_recv_msg, which has the netfn and cmd as separate bytes. This change alters the definition and users of ipmi_demangle_device_id to use a split netfn, cmd and data buffer, so it can be used with non-sequential responses. Signed-off-by: NJeremy Kerr <jk@ozlabs.org> Fixed the ipmi_ssif.c and ipmi_si_intf.c changes to use data from the response, not the data from the message, when passing info to the ipmi_demangle_device_id() function. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
The recent changes to add SMBIOS (DMI) IPMI interfaces as platform devices caused DMI to be selected before ACPI, causing ACPI type of operations to not work. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Colin Ian King 提交于
The function ipmi_get_info_from_resources is local to the source and does not need to be in global scope, so make it static. Add in newline to function declaration to make it checkpatch warning clean. Cleans up sparse warnings: symbol 'ipmi_get_info_from_resources' was not declared. Should it be static? Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Hanjun Guo 提交于
When ipmi is probed via ACPI, the boot log shows [ 17.945139] ipmi_si IPI0001:00: probing via device tree [ 17.950369] ipmi_si IPI0001:00: ipmi_si: probing via ACPI [ 17.955795] ipmi_si IPI0001:00: [io 0x00e4-0x3fff] regsize 1 spacing 1 irq 0 [ 17.962932] ipmi_si: Adding ACPI-specified bt state machine which "ipmi_si IPI0001:00: probing via device tree" is misleading with a ACPI HID "IPI0001" but probing via DT. Eliminate this misleading print info by checking of_node is valid or not before calling of_ipmi_probe(). Signed-off-by: NHanjun Guo <hanjun.guo@linaro.org> Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
- 22 8月, 2017 1 次提交
-
-
由 Helge Deller 提交于
Additionally add a MODULE_DEVICE_TABLE entry so that udev can load the driver automatically. Signed-off-by: NHelge Deller <deller@gmx.de>
-
- 20 6月, 2017 1 次提交
-
-
由 Corey Minyard 提交于
Now that the IPMI DMI code creates a platform device for IPMI devices in the firmware, use that instead of handling all the DMI work in the IPMI drivers themselves. Signed-off-by: NCorey Minyard <cminyard@mvista.com> Cc: Andy Lutomirski <luto@kernel.org>
-
- 10 6月, 2017 1 次提交
-
-
由 Corey Minyard 提交于
It's the proper value, so there's no effect, but just to be proper, use the right value. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
- 20 4月, 2017 1 次提交
-
-
由 David Howells 提交于
When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/char/ipmi/. Suggested-by: NAlan Cox <gnomes@lxorguk.ukuu.org.uk> Signed-off-by: NDavid Howells <dhowells@redhat.com> Reviewed-by: NCorey Minyard <cminyard@mvista.com> cc: openipmi-developer@lists.sourceforge.net
-
- 11 4月, 2017 1 次提交
-
-
由 Tony Camuso 提交于
Commit 1abf71ee moved the creation of new_smi->dev to earlier in the init sequence in order to provide infrastructure for log printing. However, the init_name was created with a hard-coded value of zero. This presents a problem in systems with more than one interface, producing a call trace in dmesg. To correct the problem, simply use smi_num instead of the hard-coded value of zero. Tested on a lenovo x3950. Signed-off-by: NTony Camuso <tcamuso@redhat.com> There was actually a more general problem, the platform device wasn't being set correctly, either, and there was a possible (though extremely unlikely) race on smi_num. Add locks to clean up the race and use the proper value for the platform device, too. Tested on qemu in various configurations. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
- 25 11月, 2016 3 次提交
-
-
由 Corey Minyard 提交于
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: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
Convert them to pr_xxx or dev_xxx. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
Some logs are printed out early using smi->dev, but on a platform device that is not created until later. So move the creation of that device structure earlier in the sequence so it can be used for printing. Signed-off-by: NCorey Minyard <cminyard@mvista.com> Tested-by: NCorentin Labbe <clabbe.montjoie@gmail.com>
-
- 08 11月, 2016 1 次提交
-
-
由 Corey Minyard 提交于
Commit d9b7e4f7 ("ipmi: Periodically check to see if irqs and messages are set right") to verify the contents of global events. However, the wrong function was being called in some cases, checking for messages, not events. Signed-off-by: NCorey Minyard <cminyard@mvista.com> Tested-by: NJason DiPietro <J.DiPietro@F5.com>
-
- 27 7月, 2016 1 次提交
-
-
由 Tony Camuso 提交于
Parameter trydefaults=1 causes the ipmi_init to initialize ipmi through the legacy port io space that was designated for ipmi. Architectures that do not map legacy port io can panic when trydefaults=1. Rather than implement build-time conditional exceptions for each architecture that does not map legacy port io, we have removed legacy port io from the driver. Parameter 'trydefaults' has been removed. Attempts to use it hereafter will evoke the "Unknown symbol in module, or unknown parameter" message. The patch was built against a number of architectures and tested for regressions and functionality on x86_64 and ARM64. Signed-off-by: NTony Camuso <tcamuso@redhat.com> Removed the config entry and the address source entry for default, since neither were used any more. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
- 17 5月, 2016 2 次提交
-
-
由 Corey Minyard 提交于
Commit d61a3ead ("[PATCH] IPMI: reserve I/O ports separately") changed the way I/O ports were reserved and includes this comment in log: Some BIOSes reserve disjoint I/O regions in their ACPI tables for the IPMI controller. This causes problems when trying to register the entire I/O region. Therefore we must register each I/O port separately. There is a similar problem with memio regions on an arm64 platform (AMD Seattle). Where I see: ipmi message handler version 39.2 ipmi_si AMDI0300:00: probing via device tree ipmi_si AMDI0300:00: ipmi_si: probing via ACPI ipmi_si AMDI0300:00: [mem 0xe0010000] regsize 1 spacing 4 irq 23 ipmi_si: Adding ACPI-specified kcs state machine IPMI System Interface driver. ipmi_si: Trying ACPI-specified kcs state machine at mem \ address 0xe0010000, slave address 0x0, irq 23 ipmi_si: Could not set up I/O space The problem is that the ACPI core registers disjoint regions for the platform device: e0010000-e0010000 : AMDI0300:00 e0010004-e0010004 : AMDI0300:00 and the ipmi_si driver tries to register one region e0010000-e0010004. Based on a patch from Mark Salter <msalter@redhat.com>, who also wrote all the above text. Signed-off-by: NCorey Minyard <cminyard@mvista.com> Tested-by: NMark Salter <msalter@redhat.com>
-
由 Corey Minyard 提交于
Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
- 18 3月, 2016 3 次提交
-
-
由 Joe Lawrence 提交于
Extend the tryacpi module parameter to turn off acpi_ipmi_probe such that hard-coded options (type, ports, address, etc.) have complete control over the smi_info data structures setup by the driver. Signed-off-by: NJoe Lawrence <joe.lawrence@stratus.com> Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
Under some circumstances, the IPMI state machine could return a call without delay option but the driver would still do a long delay because the result wasn't checked. Instead of calling the state machine after transaction done, just go back to the top of the processing to start over. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
Several were tryacpi instead of their actual values. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
- 04 2月, 2016 1 次提交
-
-
由 Tony Camuso 提交于
Enclosing '#include <linux/acpi.h>' within '#ifdef CONFIG_ACPI' is unnecessary, since it has its own conditional compile for CONFIG_ACPI. Commit 0fbcf4af ("ipmi: Convert the IPMI SI ACPI handling to a platform device") exposed this as a problem for platforms that do not support ACPI when it introduced a call to ACPI_PTR() macro outside of the CONFIG_ACPI conditional compile. This would have been perfectly acceptable if acpi.h were not conditionally excluded for the non-acpi platform, because the conditional compile within acpi.h defines ACPI_PTR() to return NULL when compiled for non acpi platforms. Signed-off-by: NTony Camuso <tcamuso@redhat.com> Fixed commit reference in header to conform to standard. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
- 13 1月, 2016 2 次提交
-
-
由 Dave Jones 提交于
We call cleanup_one_si from ipmi_pci_remove, which calls ->addr_source_cleanup, which gets set to point to ipmi_pci_cleanup, which does a pci_disable_device. On return from this, we do a second pci_disable_device, which results in the trace below. ipmi_si 0000:00:16.0: disabling already-disabled device Call Trace: [<ffffffff818ce54c>] dump_stack+0x45/0x57 [<ffffffff810525f7>] warn_slowpath_common+0x97/0xe0 [<ffffffff810526f6>] warn_slowpath_fmt+0x46/0x50 [<ffffffff81497ca1>] pci_disable_device+0xb1/0xc0 [<ffffffffa00851a5>] ipmi_pci_remove+0x25/0x30 [ipmi_si] [<ffffffff8149a696>] pci_device_remove+0x46/0xc0 [<ffffffff8156801f>] __device_release_driver+0x7f/0xf0 [<ffffffff81568978>] driver_detach+0xb8/0xc0 [<ffffffff81567e50>] bus_remove_driver+0x50/0xa0 [<ffffffff8156914e>] driver_unregister+0x2e/0x60 [<ffffffff8149a3e5>] pci_unregister_driver+0x25/0x90 [<ffffffffa0085804>] cleanup_ipmi_si+0xd4/0xf0 [ipmi_si] [<ffffffff810c727a>] SyS_delete_module+0x12a/0x200 [<ffffffff818d4d72>] system_call_fastpath+0x12/0x17 Signed-off-by: NDave Jones <dsj@fb.com>
-
由 LABBE Corentin 提交于
Lots of char arrays could be set as const since they contain only literal char arrays. We could in the same time make const some struct members who are pointer to those const char arrays. Signed-off-by: NLABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
- 10 12月, 2015 1 次提交
-
-
由 Jan Stancek 提交于
We encountered a panic on boot in ipmi_si on a dell per320 due to an uninitialized timer as follows. static int smi_start_processing(void *send_info, ipmi_smi_t intf) { /* Try to claim any interrupts. */ if (new_smi->irq_setup) new_smi->irq_setup(new_smi); --> IRQ arrives here and irq handler tries to modify uninitialized timer which triggers BUG_ON(!timer->function) in __mod_timer(). Call Trace: <IRQ> [<ffffffffa0532617>] start_new_msg+0x47/0x80 [ipmi_si] [<ffffffffa053269e>] start_check_enables+0x4e/0x60 [ipmi_si] [<ffffffffa0532bd8>] smi_event_handler+0x1e8/0x640 [ipmi_si] [<ffffffff810f5584>] ? __rcu_process_callbacks+0x54/0x350 [<ffffffffa053327c>] si_irq_handler+0x3c/0x60 [ipmi_si] [<ffffffff810efaf0>] handle_IRQ_event+0x60/0x170 [<ffffffff810f245e>] handle_edge_irq+0xde/0x180 [<ffffffff8100fc59>] handle_irq+0x49/0xa0 [<ffffffff8154643c>] do_IRQ+0x6c/0xf0 [<ffffffff8100ba53>] ret_from_intr+0x0/0x11 /* Set up the timer that drives the interface. */ setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi); The following patch fixes the problem. To: Openipmi-developer@lists.sourceforge.net To: Corey Minyard <minyard@acm.org> CC: linux-kernel@vger.kernel.org Signed-off-by: NJan Stancek <jstancek@redhat.com> Signed-off-by: NTony Camuso <tcamuso@redhat.com> Signed-off-by: NCorey Minyard <cminyard@mvista.com> Cc: stable@vger.kernel.org # Applies cleanly to 3.10-, needs small rework before
-
- 16 11月, 2015 3 次提交
-
-
由 Luis de Bethencourt 提交于
The policy for drivers is to have MODULE_DEVICE_TABLE() just after the struct used in it. For clarity. Suggested-by: NCorey Minyard <minyard@acm.org> Signed-off-by: NLuis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
The IPMI driver would let the final timeout just happen, but it could easily just stop the timer. If the timer stop fails that's ok, that should be rare. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
The timer and thread were not being started for internal messages, so in interrupt mode if something hung the timer would never go off and clean things up. Factor out the internal message sending and start the timer for those messages, too. Signed-off-by: NCorey Minyard <cminyard@mvista.com> Tested-by: NGouji, Masayuki <gouji.masayuki@jp.fujitsu.com> Cc: stable@vger.kernel.org
-
- 04 9月, 2015 7 次提交
-
-
由 Brijesh Singh 提交于
Fix autoloading ipmi modules when using device tree. Signed-off-by: NBrijesh Singh <brijeshkumar.singh@amd.com> Moved this change up into the CONFIG_OF section to account for changes to the probing code. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
It appears that some BMCs support interrupts but don't support setting the irq enable bits. The interrupts are just always on. Sigh. Add code to compensate. The new code was very similar to another functions, so this also factors out the common code into other functions. Signed-off-by: NCorey Minyard <cminyard@mvista.com> Tested-by: NHenrik Korkuc <henrik@kirneh.eu>
-
由 Hidehiro Kawai 提交于
When flushing queued messages in run-to-completion mode, smi_event_handler() is recursively called. flush_messages() smi_event_handler() handle_transaction_done() deliver_recv_msg() ipmi_smi_msg_received() smi_recv_tasklet() sender() flush_messages() smi_event_handler() ... The depth of the recursive call depends on the number of queued messages, so it can cause a stack overflow if many messages have been queued. To solve this problem, this patch removes flush_messages() from sender()@ipmi_si_intf.c. Instead, add flush_messages() to caller side of sender() if needed. Additionally, to implement this, add new handler flush_messages to struct ipmi_smi_handlers. Signed-off-by: NHidehiro Kawai <hidehiro.kawai.ez@hitachi.com> Fixed up a comment and some spacing issues. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Hidehiro Kawai 提交于
Factor out message flushing procedure which is used in run-to-completion mode. This patch doesn't change the logic. Signed-off-by: NHidehiro Kawai <hidehiro.kawai.ez@hitachi.com> Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Corey Minyard 提交于
Several data structures were only used for reading, so make them const. Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Markus Elfring 提交于
The cleanup_one_si() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net> Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-
由 Shailendra Verma 提交于
Signed-off-by: NShailendra Verma <shailendra.capricorn@gmail.com> Signed-off-by: NCorey Minyard <cminyard@mvista.com>
-