summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fpga: socfpga: Fix check of return value of devm_request_irqMoritz Fischer2015-10-291-1/+1
| | | | | | | | | | The return value should be checked for non-zero, instead of checking it being IS_ERR_VALUE(). Acked-by: Alan Tull <atull@opensource.altera.com> Reviewed-by: Josh Cartwright <joshc@eso.teric.us> Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* lkdtm: fix ACCESS_USERSPACE testStephen Smalley2015-10-291-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a copy_to_user() call to the ACCESS_USERSPACE test prior to attempting direct dereferencing of the user address to ensure the page is present. Otherwise, a fault occurs on arm kernels even prior to the introduction of CONFIG_CPU_SW_DOMAIN_PAN, and there is no difference in behavior for CONFIG_CPU_SW_DOMAIN_PAN=n vs CONFIG_CPU_SW_DOMAIN_PAN=y. Before this change, for any value of CONFIG_CPU_SW_DOMAIN_PAN: lkdtm: Performing direct entry ACCESS_USERSPACE lkdtm: attempting bad read at b6fe8000 Unable to handle kernel paging request at virtual address b6fe8000 After this change, for CONFIG_CPU_SW_DOMAIN_PAN=n: lkdtm: Performing direct entry ACCESS_USERSPACE lkdtm: attempting bad read at b6efc000 lkdtm: attempting bad write at b6efc000 After this change, for CONFIG_CPU_SW_DOMAIN_PAN=y: lkdtm: Performing direct entry ACCESS_USERSPACE lkdtm: attempting bad read at b6f7d000 Unhandled fault: page domain fault (0x01b) at 0xb6f7d000 ... Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mcb: Destroy IDA on module unloadJohannes Thumshirn2015-10-291-0/+1
| | | | | | | Destroy mcb_ida on module_unload Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mcb: Do not return zero on error path in mcb_pci_probe()Alexey Khoroshilov2015-10-291-0/+1
| | | | | | | | | | | There is an error path in mcb_pci_probe() where it returns zero instead of error code. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: bus: set the device name before running fixupTomas Winkler2015-10-291-4/+16
| | | | | | | | | The mei bus fixup use dev_xxx services for printing to kernel log so we need to setup the device name prior to running fixup hooks. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: bus: use correct lock orderingTomas Winkler2015-10-291-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The correct lock order is cl_bus_lock device_lock me_clients_rwsem This order was violated in bus rescan and remove routines when me_client_rwsem was locked before cl_bus_lock. Chain exists of: [ 4.321653] &dev->device_lock --> &dev->me_clients_rwsem --> &dev->cl_bus_lock [ 4.321653] [ 4.321679] Possible unsafe locking scenario: [ 4.321679] [ 4.321693] CPU0 CPU1 [ 4.321701] ---- ---- [ 4.321709] lock(&dev->cl_bus_lock); [ 4.321720] lock(&dev->me_clients_rwsem); [ 4.321733] lock(&dev->cl_bus_lock); [ 4.321745] lock(&dev->device_lock); [ 4.321755] [ 4.321755] *** DEADLOCK *** [ 4.321755] Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: Fix debugfs filename in error outputAlexander Kuleshov2015-10-271-1/+1
| | | | | | Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* 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>
* fpga: zynq-fpga: Fix issue with drvdata being overwritten.Moritz Fischer2015-10-231-3/+4
| | | | | | | | | | | | Upon registering a FPGA Manager low level driver, FPGA Manager core overwrites the platform drvdata pointer. Prior to this commit zynq-fpga falsely relied on this pointer to still be valid at remove() time. Reported-by: Alan Tull <atull@opensource.altera.com> Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Acked-by: Alan Tull <atull@opensource.altera.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* fpga manager: remove unnecessary null pointer checksAlan Tull2015-10-231-8/+4
| | | | | | | | | | Remove unnecessary null pointer checks. We want the caller of these functions to do their own pointer checks. Add some comments to document this. Signed-off-by: Alan Tull <atull@opensource.altera.com> Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* fpga manager: ensure lifetime with of_fpga_mgr_getAlan Tull2015-10-231-15/+17
| | | | | | | | | | | | | | | | Ensure device and driver lifetime from of_fpga_mgr_get() to fpga_mgr_put(). * Don't put_device() in of_fpga_mgr_get, do it in fpga_mgr_put(). (still do put_device if there is an error). * Do module_get on the low level driver. * Don't need to module_get(THIS_MODULE) since we won't be allowed to unload the fpga manager core without unloading low level driver first. * Remove unnedessary null check for node pointer. Signed-off-by: Alan Tull <atull@opensource.altera.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* fpga: zynq-fpga: Change fw format to handle bin instead of bit.Moritz Fischer2015-10-231-22/+2
| | | | | | | | | | This gets rid of the code to strip away the header and byteswap, as well as the check for the sync word. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Reviewed-by: Josh Cartwright <joshc@ni.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* fpga: zynq-fpga: Fix unbalanced clock handlingMoritz Fischer2015-10-231-2/+2
| | | | | | | | | This commit fixes the unbalanced clock handling, where a failed probe would leave the clock with an enable count of -1. Reported-by: Josh Cartwright <joshc@ni.com> Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc: sram: partition base address belongs to __iomem spaceVladimir Zapolskiy2015-10-181-3/+3
| | | | | | | | | | | The change fixes a warning found by sparse: drivers/misc/sram.c:134:20: warning: incorrect type in assignment (different address spaces) drivers/misc/sram.c:134:20: expected void *base drivers/misc/sram.c:134:20: got void [noderef] <asn:2>* Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* coresight: etm3x: adding documentation for sysFS's cpu interfaceMathieu Poirier2015-10-171-0/+6
| | | | | | | | Supplementing ABI documentation with a description of the newly added interface. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vme: 8-bit status/id takes 256 values, not 255Dmitry Kalinkin2015-10-172-1/+6
| | | | | | | Fixes an off by one array size. Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* fpga manager: Adding FPGA Manager support for Xilinx Zynq 7000Moritz Fischer2015-10-173-0/+539
| | | | | | | | | This commit adds FPGA Manager support for the Xilinx Zynq chip. The code borrows some from the xdevcfg driver in Xilinx' vendor tree. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ARM: zynq: dt: Updated devicetree for Zynq 7000 platform.Moritz Fischer2015-10-171-0/+5
| | | | | | | | | Added addtional nodes required for FPGA Manager operation of the Xilinx Zynq Devc configuration interface. Reviewed-by: Sören Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ARM: dt: fpga: Added binding docs for Xilinx Zynq FPGA manager.Moritz Fischer2015-10-171-0/+19
| | | | | Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: proc/modules, limit text processing to 'sed'Alexander Kapshuk2015-10-171-4/+13
| | | | | | | | | | | | | | | | | | | | This patch is more of a personal preference, rather than a fix for a problem. The current implementation used a combination of both 'cat' and 'sed' to generate an unsorted list of kernel modules separated by while space. The proposed implementation uses 'sort' and 'sed' to generate a sort list of kernel modules separated by while space. Tested on: Gentoo Linux Debian 6.0.10 Oracle Linux Server release 7.1 Arch Linux openSuSE 13.2 Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: wireless-tools, look for numerical input, not field numberAlexander Kapshuk2015-10-171-2/+6
| | | | | | | | | | Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Tested on: Gentoo Linux Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: use 'udevadm', instead of 'udevinfo'Alexander Kapshuk2015-10-171-1/+6
| | | | | | | | | | | | | | | | | 'udevinfo' no longer seems to be available across various distros. 'udevadm' seems to be the currently valid way to look up the 'udev' version. Tested on: Gentoo Linux Debian 6.0.10 Oracle Linux Server release 7.1 Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: sh-utils, look for numerical input, not field numberAlexander Kapshuk2015-10-171-1/+6
| | | | | | | | | | | | Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Tested on: Gentoo Linux Debian 6.0.10 Oracle Linux Server release 7.1 Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: loadkeys, look for numerical input, not field numberAlexander Kapshuk2015-10-171-7/+6
| | | | | | | | | | | | | | | | | | | 'loadkeys -h' no longer prints the version number across all distros, despite the claim to do so in the manpage, which I found to be the case on a Debian Linux system. The proposed implementation utilises the output of 'loadkeys -V' to acquire the version of both 'Kbd' and 'Console-tools'. Tested on: Gentoo Linux Debian 6.0.10 Oracle Linux Server release 7.1 Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: net-tools, look for numerical input, not field numberAlexander Kapshuk2015-10-171-2/+6
| | | | | | | | Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: procps, look for numerical input, not field numberAlexander Kapshuk2015-10-171-2/+6
| | | | | | | | Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: libcpp, fix missing outputAlexander Kapshuk2015-10-171-3/+12
| | | | | | | | | | | | | | | | | Neither 'libg++.so', nor 'libstdc++.so' were found where the current implementation expects them to be found in the distros below. Gentoo Linux Debian 6.0.10 Oracle Linux Server release 7.1 Which results in zero ouput generated. The proposed implementation relies on 'ldconfig' to locate the libraries in question. 'Sed' is used to do the text processing. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: ldd, look for numerical input, not field numberAlexander Kapshuk2015-10-171-2/+6
| | | | | | | | | | Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Proposed implementation also eliminates the necessity to invoke 'head' + 'awk'. The '-v' flag either seems to have been deprecated in some distros, e.g. Gentoo, or is an alias for '--version' in others. The proposed implementation uses the latter flag only. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: libc, input redirection to sed fails in some distrosAlexander Kapshuk2015-10-171-2/+6
| | | | | | | | | | | | | | | | | | The current implementation has been found not to work across all distros. The proposed implementation relies on 'sed' to both output the string 'Linux C Library' as well as to open '/proc/self/maps' without having to use output redirection. Tested on: Gentoo Linux Debian 6.0.10 Oracle Linux Server release 7.1 Arch Linux openSuSE 13.2 Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: ppp, look for numerical input, not field numberAlexander Kapshuk2015-10-171-2/+6
| | | | | | | | | | | Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'. Tested on: Oracle Linux Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: quota-tools, look for numerical input, not field numberAlexander Kapshuk2015-10-171-2/+6
| | | | | | | | Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: pcmciautils, look for numerical input, not field numberAlexander Kapshuk2015-10-171-1/+6
| | | | | | | | Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: xfsprogs, look for numerical input, not field numberAlexander Kapshuk2015-10-171-2/+6
| | | | | | | | Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: reiserfsprogs, look for numerical input, not field numberAlexander Kapshuk2015-10-171-2/+6
| | | | | | | | | Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Proposed implementation also eliminates the necessity to invoke 'grep' + 'awk'. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: jfsutils, look for numerical input, not field numberAlexander Kapshuk2015-10-171-2/+6
| | | | | | | | Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Proposed implementation also eliminates the necessity to invoke 'grep' + 'sed' + 'awk'. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: e2fsprogs, look for numerical input, not field numberAlexander Kapshuk2015-10-171-2/+6
| | | | | | | | | | | | | Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Proposed implementation also eliminates the necessity to invoke 'grep' + 'sed' + 'awk'. Tested on: Gentoo Linux Debian 6.0.10 Oracle Linux Server release 7.1 Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: module-init-tools, look for numerical input, not field numberAlexander Kapshuk2015-10-171-1/+6
| | | | | | | | | | | | Rely on regex to find the version number, rather than rely on numerical input to be found in a particular input field. Tested on: Gentoo Linux Debian 6.0.10 Oracle Linux Server release 7.1 Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: util-linux, 'fdformat' not ubiquitous any longerAlexander Kapshuk2015-10-171-5/+6
| | | | | | | | | | | | | | | | | | | | The current implementation relies on 'fdformat' to output the version of 'util-linux'. This does not seem to be reliable any longer, as 'fdformat' does not seem to come preinstalled in all ditros these days. The proposed implementation uses 'mount' to output both the version of 'util-linux' and 'mount' proper, as 'mount' is also a part of the 'util-linux' package. Tested on: Gentoo Linux Debian 6.0.10 Oracle Linux Server release 7.1 Rely on regex to find the version number, rather than a field number. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: binutils, fix inaccurate outputAlexander Kapshuk2015-10-171-1/+6
| | | | | | | | | | | | | | | | | | | | Current implementation output on Gentoo Linux: binutils 2.25.1 1.1 2.25.1 Proposed implementation: Binutils 2.25.1 Tested on: Gentoo Linux Debian 6.0.10 Oracle Linux Server release 7.1 Rely on regex to find the version number. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: make --version, use regex to find version numberAlexander Kapshuk2015-10-171-2/+6
| | | | | | | | Rely on regex to find the version number, rather than a field number. Reduce the number of 'awk' invocations from two to one. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ver_linux: gcc -dumpversion, use regex to find version numberAlexander Kapshuk2015-10-171-2/+6
| | | | | | | Rely on regex to find the version number, rather than a field number. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc: sram: extend usage of reserved partitionsVladimir Zapolskiy2015-10-172-8/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds functionality to operate on reserved SRAM partitions described in device tree file. Two partition properties are added, "pool" and "export", the first one allows to share a specific partition for usage by a kernel consumer in the same manner as it is done for the whole SRAM device, and "export" property provides access to some SRAM area from userspace over sysfs interface. Practically it is possible to specify both properties for an SRAM partition, however simultaneous access from a kernel consumer and from userspace is not serialized, but still the combination may be useful for debugging purpose. The change opens the following scenarios of SRAM usage: * updates in a particular SRAM area specified by offset and size are done by bootloader, then this information is utilized by the kernel, * a particular SRAM area is rw accessed from userspace, the stored data is persistent on soft reboots, * a device driver secures SRAM area for its purposes, * etc. Note, strictly speaking the added optional properties describe policy of SRAM usage, rather than hardware, but here the policy mostly resembles flash partitions in devicetree, which is undoubtedly a very popular option but it does not describe hardware. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* MAINTAINERS: Add maintainership for MIC driversSudeep Dutt2015-10-171-0/+16
| | | | | | | | Add entry for MIC drivers to the MAINTAINERS file Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc: mic/scif: fix error code in scif_create_remote_lookup()Dan Carpenter2015-10-171-2/+6
| | | | | | | | | We should be returning -ENOMEM here instead of success. Fixes: ba612aa8b487 ('misc: mic: SCIF memory registration and unregistration') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc: mic/scif: re-take a lock on error pathDan Carpenter2015-10-171-0/+1
| | | | | | | | | | The caller expects that we take this lock again before returning otherwise it you get double unlocks and races. Fixes: ba612aa8b487 ('misc: mic: SCIF memory registration and unregistration') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: amthif: Do not compare bool to 0/1Alexander Usyskin2015-10-171-1/+1
| | | | | | | | | Spotted by coccicheck: drivers/misc/mei/amthif.c:479:5-26: WARNING: Comparison of bool to 0/1 Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: bus: fix c&p issue in the kdocTomas Winkler2015-10-171-2/+2
| | | | | | | | | s/send/receive/ The buffer in the receive function is not used for sending Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: fix the KDoc formatingAlexander Usyskin2015-10-172-11/+12
| | | | | | | | KDoc function section start with double start: /** instead of /* Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: keep the device awake during reads in chunksAlexander Usyskin2015-10-171-0/+4
| | | | | | | | | | | Long messages are read in chunks, to prevent trashing runtime pm between the reading of the chunks we call pm_runtime_mark_last_busy() on non-final chunk message as the next chunk of the same message will be received immediately in the next interrupt with high probablity. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mei: cancel driver workers only after client devices were removedTomas Winkler2015-10-171-2/+2
| | | | | | | | | | In process of client devices removal from the bus there still might be communication between a driver and the mei device hence we need to cancel supporting workers only after all the client devices were removed. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>