summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei
Commit message (Collapse)AuthorAgeFilesLines
* 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: 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: 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