summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei
Commit message (Collapse)AuthorAgeFilesLines
* char/misc: remove CONFIG_EXPERIMENTAL dependenciesGreg Kroah-Hartman2012-09-181-1/+1
| | | | | | | | | | | | | | As discussed at the kernel summit this year, CONFIG_EXPERIMENTAL means nothing, so let's get rid of it. Cc: Kees Cook <keescook@chromium.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Tomas Winkler <tomas.winkler@intel.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Paul Bolle <pebolle@tiscali.nl> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Anatolij Gustschin <agust@denx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: don't print buffer as a stringTomas Winkler2012-09-101-8/+1
| | | | | | | | non readable junk was printed to the logs we will add proper buffer dumping mechanism later if needed Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: struct mei_message_data doesn't have to be packedTomas Winkler2012-09-101-1/+1
| | | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: add error messages for open count errorsTomas Winkler2012-09-101-2/+8
| | | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: add lynx point pci device idsTomas Winkler2012-09-052-0/+4
| | | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: fix max number of open handlesTomas Winkler2012-09-051-6/+8
| | | | | | | | | | | | | | There was internal confusion in wether bus message clinet (0) is counted in or not The bitmap me_clients_map that accomodate was initialized w/o it (255) but later on it the clinet 0 was reserved Thus were able to open only 252 instead of 253 clients Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: rename struct pci_dev *mei_device to mei_pdevTomas Winkler2012-09-052-14/+8
| | | | | | | | | | 1. rename mei_device variable to mei_pdev to remove confusion with type 'struct mei_device' 2. mei_pdev no longer need to be gloabal so make it static and remove the declaration from the header file Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: wd: use watchdog_set/get_drvdata for passing mei_deviceTomas Winkler2012-08-161-13/+16
| | | | | | | | use watchdog_set/get_drvdata for passing mei_device to watchdog_ops handlers instead of using global mei_device Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: wd: decouple and revamp watchdog state machineTomas Winkler2012-08-166-27/+34
| | | | | | | | | | | | Before ME watchdog was exported through standard watchdog interface it was closed and started together with the mei device. The major issue is that closing ME watchdog disabled also MEI device, to fix this the watchdog state machine has to be independent from MEI state machine. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: wd: rename watchdog constants to be more descriptiveTomas Winkler2012-08-164-26/+23
| | | | | | | | | 1. rename defines to more be descriptive 2. remove duplicated defines from interface.h 3. add common prefix MEI_ Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: wd: add option WDIOF_SETTIMEOUTTomas Winkler2012-08-161-1/+3
| | | | | | | | According watchdog-kernel-api.txt WDIOF_SETTIMEOUT should be set if the driver supplies set_timeout function Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: fix device stall after wd is stoppedTomas Winkler2012-08-161-1/+1
| | | | | | | | | | | | After watchdog was disabled the driver would stall due to wrong calculation of credits reduction The cat&paste bug was introduced in the commit 7bdf72d3d8059a50214069ea4b87c2174645f40f mei: introduce mei_data2slots wrapper Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: name space for mei device stateTomas Winkler2012-08-166-55/+77
| | | | | | | | | 1. add MEI_DEV_ prefix for mei device state enums 2. rename mei_state to dev_state 3. add constant to string translation for debug purposes Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: style : reformat PCI device IDsTomas Winkler2012-08-161-40/+39
| | | | | | | | 1. reformat PCI ids list in hw.h for better readability 2. update some code and brand names Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: use KBUILD_MODNAME when allocating resources from the OSTomas Winkler2012-08-161-8/+6
| | | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: add mei_quirk_probe functionTomas Winkler2012-08-161-0/+27
| | | | | | | | | | | | | The main purpose of this function is to exclude ME devices without support for MEI/HECI interface from binding Currently affected systems are C600/X79 based servers that expose PCI device even though it doesn't supported ME Interface. MEI driver accessing such nonfunctional device can corrupt the system. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: revamp me client search functionTomas Winkler2012-08-165-74/+60
| | | | | | | | | | | | | | | | me client search functions returns index into me_client array according me client id or me client uuid. 1. Add common prefix for the functions mei_me_cl_<> 2. create new function mei_me_cl_by_id that wraps open coded loops scattered over the code 3. rename mei_find_me_client_index to mei_me_cl_by_uuid 4. rename mei_find_me_client_update_filext to mei_me_cl_update_filext and updates its parameter names Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: use module_pci_driverTomas Winkler2012-07-191-38/+1
| | | | | | | | use module_pci_driver() macro to wrap standard pci module registration into a single line Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 3.5-rc7 into char-misc-next.Greg Kroah-Hartman2012-07-183-7/+8
|\ | | | | | | | | | | | | This lets us pick up the mei driver changes that we need in order to handle future merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mei: pci_resume: set IRQF_ONESHOT for msi request_threaded_irqTomas Winkler2012-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when the default irq quick handler is used then IRQF_ONESHOT must be set otherwise the request fails and following error is displayed: mei 0000:00:16.0: irq 48 for MSI/MSI-X genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq 48 mei 0000:00:16.0: request_threaded_irq failed: irq = 48. dpm_run_callback(): pci_pm_resume+0x0/0x140 returns -22 PM: Device 0000:00:16.0 failed to resume async: error -22 Reported-by: Peter Wu <lekensteyn@gmail.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Tested-by: Peter Wu <lekensteyn@gmail.com> Signed-off-by: Roland Dreier <roland@purestorage.com> Cc: stable <stable@vger.kernel.org> # 3.5 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * misc: mei: set WDIOF_ALARMONLY on mei watchdogTomas Winkler2012-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | mei watchdog doesn't reboot the system it only produces event therefore mark it as WDIOF_ALARMONLY. This patch depends on: commit 2bbeed016dd96045ec82c3a309afddcc3a0db1d2 Author: Alan Cox <alan@linux.intel.com> watchdog: Add a flag to indicate the watchdog doesn't reboot things Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * misc: mei: Disable MSI when IRQ registration failsSamuel Ortiz2012-06-131-2/+2
| | | | | | | | | | | | | | | | | | Since MSI is enabled right before that, we should disable it when registration fails. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * misc: mei: fix stalled readTomas Winkler2012-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug caused severe connectivity issue in the LMS application (LMS is described in Documentation/misc-devices/mei/mei.txt) The bug was introduced in patch: commit 1ccb7b6249f9bc50678e2a383084ed0a34cc9239 staging/mei: propagate error codes up in the write flow The patch has reverted the return value logic of some fo function but the conditional in _mei_irq_thread_read function was not swapped making read always entering the error path Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * misc: mei: unregister misc device in pci_remove functionTomas Winkler2012-06-131-1/+2
| | | | | | | | | | | | | | | | | | | | Since the misc device is registered only in the pci probe function it has to be also unregistered in the counterpart pci remove function and not in the module exit function. In case of probe failure the driver was oopsing in module exit function. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * misc: mei: set IRQF_ONESHOT for msi request_threaded_irqTomas Winkler2012-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | when the default irq quick handler is used then IRQF_ONESHOT must be set otherwise the request fails and following error is displayed: genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq ... Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: mei_irq_thread_write_handler - line break fixTomas Winkler2012-07-101-28/+16
| | | | | | | | | | | | | | | | 1. straight up lines that doesn't cross 80 characters 2. don't break strings Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: streamline the _mei_irq_thread_close/ioctol functionsTomas Winkler2012-07-101-33/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | change statements of types if (ok) do something else return err into if (err) return err do something Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: introduce mei_data2slots wrapperTomas Winkler2012-07-103-23/+18
| | | | | | | | | | | | | | | | | | | | Introduce mei_data2slots wrapper for sake of readability. This wrapper close up the open code for computing slots from a message length: rond up dwords count from payload and header byte size Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: mei_wd_host_init: update the commentTomas Winkler2012-07-101-1/+2
| | | | | | | | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: remove write only wariable wd_due_counterTomas Winkler2012-07-104-13/+4
| | | | | | | | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: mei_device can be const for mei register access functionsTomas Winkler2012-07-101-6/+7
| | | | | | | | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: revamp host buffer interface functionTomas Winkler2012-06-263-29/+24
| | | | | | | | | | | | | | | | 1. Use unified _hbuf_ prefix for host/write buffer functions. 2. Cleanup the code w/o functional changes. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: don't query HCSR for host buffer depthTomas Winkler2012-06-267-21/+24
| | | | | | | | | | | | | | | | | | | | 1. We record host (write) buffer depth during reset so we don't need to query HCSR register later on. The host buffer depth doesn't change after the reset 2. Use mei_hbuf_max_data function to compute payload size in bytes Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: group wd_interface_reg with watchdog variables within struct mei_deviceTomas Winkler2012-06-201-3/+1
| | | | | | | | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: mei_irq_thread_write_handler check for overflowTomas Winkler2012-06-201-0/+3
| | | | | | | | | | | | | | check for overflow when retrieving empty write slots Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: make mei_write_message more readableTomas Winkler2012-06-201-31/+18
| | | | | | | | | | | | | | | | | | | | 1. reduce hairy casting 2. replace open code with mei_count_empty_write_slots 4. include header size in check for overflow 3. use concise for loop instead of a while loop Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: check for error codes that mei_flow_ctrl_creds retunsTomas Winkler2012-06-201-2/+2
|/ | | | | | | | we cannot use if(!mei_flow_ctrl_creds()) logic as mei_flow_ctrl_creds also negative error codes Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: move doc files Documentation/misc-devices/meiTomas Winkler2012-05-093-705/+0
| | | | | | | | 1. move mei.txt, TODO, and the example code under Documentation/misc-devices/mei 2. update the TODO file Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: export mei.h for the user spaceTomas Winkler2012-05-0911-120/+9
| | | | | | | | | | | The header exports API for application layer 1. move under include/linux and add to the export list 2. update include path n the sources 3. update TODO Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: pci_probe/remove: use dev_err instead of printk(KERN_ERRTomas Winkler2012-05-091-8/+8
| | | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: use pr_err instead of printk(KERN_ERRTomas Winkler2012-05-091-1/+1
| | | | | | | pr_ format is more compact and enable utilizing of pr_fmt macro Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: mei: move the mei code out of stagingGreg Kroah-Hartman2012-05-0115-0/+6642
It's been cleaned up, and there's nothing else left to do, so move it out of staging into drivers/misc/ where all can use it now. Cc: Tomas Winkler <tomas.winkler@intel.com> Cc: Oren Weil <oren.jer.weil@intel.com> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud