]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
9 years agoDrivers: hv: vmbus: Use the vp_index map even for channels bound to CPU 0
K. Y. Srinivasan [Sun, 31 May 2015 06:37:47 +0000 (23:37 -0700)]
Drivers: hv: vmbus: Use the vp_index map even for channels bound to CPU 0

Map target_cpu to target_vcpu using the mapping table.
We should use the mapping table to transform guest CPU ID to VP Index
as is done for the non-performance critical channels.
While the value CPU 0 is special and will
map to VP index 0, it is good to be consistent.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agow1: ds2482: Add i2c module alias name
Ludek Hlavacek [Tue, 26 May 2015 22:37:59 +0000 (00:37 +0200)]
w1: ds2482: Add i2c module alias name

Add i2c alias to enable autoloading of the module for device specified
in device-tree.

Signed-off-by: Ludek Hlavacek <ludek_h@seznam.cz>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agosnsc: pass timeout as HZ independent value
Nicholas Mc Guire [Wed, 27 May 2015 16:34:47 +0000 (18:34 +0200)]
snsc: pass timeout as HZ independent value

schedule_timeout takes a timeout in jiffies but the code currently is
passing in a constant SCDRV_TIMEOUT which makes this timeout HZ
dependent, so pass it through msecs_to_jiffies() to fix this up.

patch was compile tested with generic_defconfig (implies CONFIG_SGI_SNSC=y)

Patch is against 4.0-rc5 (localversion-next is -next-20150527)

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMAINTAINERS: Fix typo in Android drivers git path
Lee Campbell [Sun, 24 May 2015 21:47:38 +0000 (14:47 -0700)]
MAINTAINERS: Fix typo in Android drivers git path

Fix typo in staging git location for the ANDROID DRIVERS
secion.

Signed-off-by: Lee Campbell <leecam@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMAINTAINERS: maintain parport
Sudip Mukherjee [Wed, 20 May 2015 15:27:02 +0000 (20:57 +0530)]
MAINTAINERS: maintain parport

Lets give the parport subsystem a proper name and start
maintaining the files.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoparide: use new parport device model
Sudip Mukherjee [Wed, 20 May 2015 15:27:01 +0000 (20:57 +0530)]
paride: use new parport device model

Modify paride driver to use the new parallel port device model.

Tested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoi2c-parport: use new parport device model
Sudip Mukherjee [Thu, 21 May 2015 06:16:31 +0000 (11:46 +0530)]
i2c-parport: use new parport device model

Modify i2c-parport driver to use the new parallel port device model.

Tested-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoi2c-parport: define ports to connect
Sudip Mukherjee [Wed, 20 May 2015 15:26:59 +0000 (20:56 +0530)]
i2c-parport: define ports to connect

As of now i2c-parport was connecting to all the available parallel
ports. Lets limit that to maximum of 4 instances and at the same time
define which instance connects to which parallel port.

Tested-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: panel: use new parport device model
Sudip Mukherjee [Wed, 20 May 2015 15:26:58 +0000 (20:56 +0530)]
staging: panel: use new parport device model

Converted to use the new device-model parallel port.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoparport: add device-model to parport subsystem
Sudip Mukherjee [Wed, 20 May 2015 15:26:57 +0000 (20:56 +0530)]
parport: add device-model to parport subsystem

parport subsystem starts using the device-model. Drivers using the
device-model has to define devmodel as true and should register the
device with parport using parport_register_dev_model().

Tested-by: Jean Delvare <jdelvare@suse.de>
Tested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agochar:pcmcia:synclink_cs - Do not initialise statics to 0.
Shailendra Verma [Mon, 25 May 2015 19:31:52 +0000 (01:01 +0530)]
char:pcmcia:synclink_cs - Do not initialise statics to 0.

Static variables are initialised to 0 by GCC.
Fixes the following checkpatch error:
ERROR: do not initialise statics to 0 or NULL
FILE: drivers/char/pcmcia/synclink_cs.c:440:
static bool break_on_load = 0;

Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: balloon: check if ha_region_mutex was acquired in MEM_CANCEL_ONLINE...
Vitaly Kuznetsov [Fri, 29 May 2015 18:18:02 +0000 (11:18 -0700)]
Drivers: hv: balloon: check if ha_region_mutex was acquired in MEM_CANCEL_ONLINE case

Memory notifiers are being executed in a sequential order and when one of
them fails returning something different from NOTIFY_OK the remainder of
the notification chain is not being executed. When a memory block is being
onlined in online_pages() we do memory_notify(MEM_GOING_ONLINE, ) and if
one of the notifiers in the chain fails we end up doing
memory_notify(MEM_CANCEL_ONLINE, ) so it is possible for a notifier to see
MEM_CANCEL_ONLINE without seeing the corresponding MEM_GOING_ONLINE event.
E.g. when CONFIG_KASAN is enabled the kasan_mem_notifier() is being used
to prevent memory hotplug, it returns NOTIFY_BAD for all MEM_GOING_ONLINE
events. As kasan_mem_notifier() comes before the hv_memory_notifier() in
the notification chain we don't see the MEM_GOING_ONLINE event and we do
not take the ha_region_mutex. We, however, see the MEM_CANCEL_ONLINE event
and unconditionally try to release the lock, the following is observed:

[  110.850927] =====================================
[  110.850927] [ BUG: bad unlock balance detected! ]
[  110.850927] 4.1.0-rc3_bugxxxxxxx_test_xxxx #595 Not tainted
[  110.850927] -------------------------------------
[  110.850927] systemd-udevd/920 is trying to release lock
(&dm_device.ha_region_mutex) at:
[  110.850927] [<ffffffff81acda0e>] mutex_unlock+0xe/0x10
[  110.850927] but there are no more locks to release!

At the same time we can have the ha_region_mutex taken when we get the
MEM_CANCEL_ONLINE event in case one of the memory notifiers after the
hv_memory_notifier() in the notification chain failed so we need to add
the mutex_is_locked() check. In case of MEM_ONLINE we are always supposed
to have the mutex locked.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vmbus:Update preferred vmbus protocol version to windows 10.
Keith Mange [Tue, 26 May 2015 21:23:01 +0000 (14:23 -0700)]
Drivers: hv: vmbus:Update preferred vmbus protocol version to windows 10.

Add support for Windows 10.

Signed-off-by: Keith Mange <keith.mange@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agochar: misc: restore MISC_DYNAMIC_MINOR on device_create() failure
Vladimir Zapolskiy [Mon, 18 May 2015 17:11:46 +0000 (20:11 +0300)]
char: misc: restore MISC_DYNAMIC_MINOR on device_create() failure

On attempt to register a dynamic minor misc device its minor number is
updated to a virtual minor number prior to device_create() call,
however on error path misc->minor == MISC_DYNAMIC_MINOR is not
restored.

Following the rule of thumb that a function returning an error must
not change the state of the caller, assign MISC_DYNAMIC_MINOR back.

The problem is met in a sutuation, when subsys_initcall(misc_init) is
not yet called and misc_class is not created, but misc_register()
modifies statically defined ".minor = MISC_DYNAMIC_MINOR", therefore
implicitly changing the client's logic on next attempt (e.g. retrying
from deferred list) to register a misc device, whose minor number is
converted from dynamic to some unknown static one.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomei: fix up uuid matching
Greg Kroah-Hartman [Thu, 28 May 2015 00:17:27 +0000 (17:17 -0700)]
mei: fix up uuid matching

A previous commit, c93b76b34b4d ("mei: bus: report also uuid in module
alias") caused a build error as I missed applying a needed patch to add
some macros to uapi/linux/uuid.h.  Instead of those additional macros,
change the mei code to use the existing uuid structure directly.

Fixes: c93b76b34b4d
Cc: Tomas Winkler <tomas.winkler@intel.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agohwmon: Allow to compile dell-smm-hwmon driver without /proc/i8k
Pali Rohár [Thu, 14 May 2015 11:16:37 +0000 (13:16 +0200)]
hwmon: Allow to compile dell-smm-hwmon driver without /proc/i8k

This patch splits CONFIG_I8K compile option to SENSORS_DELL_SMM and CONFIG_I8K.
Option SENSORS_DELL_SMM is now used to enable compilation of dell-smm-hwmon
driver and old CONFIG_I8K option to enable /proc/i8k interface in driver.

So this change allows to compile dell-smm-hwmon driver without legacy /proc/i8k
interface which is needed only for old Dell Inspirion models or for userspace
i8kutils package.

For backward compatibility when CONFIG_I8K is enabled then also SENSORS_DELL_SMM
is enabled and so driver dell-smm-hwmon (with /proc/i8k) is compiled.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agohwmon: Rename i8k driver to dell-smm-hwmon and move it to hwmon tree
Pali Rohár [Thu, 14 May 2015 11:16:36 +0000 (13:16 +0200)]
hwmon: Rename i8k driver to dell-smm-hwmon and move it to hwmon tree

This commit moves i8k driver to hwmon tree under name dell-smm-hwmon which is
better name then abbreviation i8k. For backward compatibility is added macro
MODULE_ALIAS("i8k") so modprobe will load driver also old name i8k. CONFIG_I8K
compile option was not changed.

This commit also adds me as maintainer of this new dell-smm-hwmon driver and
remove Guenter Roeck from list who is implicit maintainer all hwmon drivers.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agovirtio_console: silence a static checker warning
Dan Carpenter [Fri, 8 May 2015 09:16:25 +0000 (12:16 +0300)]
virtio_console: silence a static checker warning

My static checker complains that this sprintf() can overflow but really
it can't.  Just silence the warning by using snprintf().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoxillybus: XILLYBUS_OF should depend on HAS_DMA
Geert Uytterhoeven [Sun, 26 Apr 2015 08:11:38 +0000 (10:11 +0200)]
xillybus: XILLYBUS_OF should depend on HAS_DMA

If NO_DMA=y:

    drivers/built-in.o: In function `xilly_of_unmap':
    xillybus_of.c:(.text+0xa860e): undefined reference to `dma_unmap_single'
    drivers/built-in.o: In function `xilly_map_single_of':
    xillybus_of.c:(.text+0xa8668): undefined reference to `dma_map_single'
    xillybus_of.c:(.text+0xa8676): undefined reference to `dma_mapping_error'
    xillybus_of.c:(.text+0xa86ca): undefined reference to `dma_unmap_single'
    drivers/built-in.o: In function `xilly_dma_sync_single_for_device_of':
    xillybus_of.c:(.text+0xa8700): undefined reference to `dma_sync_single_for_cpu'
    drivers/built-in.o: In function `xilly_dma_sync_single_for_cpu_of':
    xillybus_of.c:(.text+0xa8726): undefined reference to `dma_sync_single_for_cpu'

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Eli Billauer <eli.billauer@gmail.com>
--
v2:
  - Add Acked-by, send to char and misc drivers maintainers.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agogoldfish_pipe: Fix unlikely() misuse
Joe Perches [Fri, 10 Apr 2015 23:47:35 +0000 (16:47 -0700)]
goldfish_pipe: Fix unlikely() misuse

Move the close parenthesis.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agopcmcia: fix a boot time warning in pcmcia cs code
Dmitry Eremin-Solenikov [Mon, 30 Mar 2015 11:33:45 +0000 (14:33 +0300)]
pcmcia: fix a boot time warning in pcmcia cs code

During bootup pcmcia (pccardd) code enforces the following warning
backtrace:

do not call blocking ops when !TASK_RUNNING; state=1 set at [<c0319e74>] pccardd+0xb8/0x3fc
Modules linked in:
CPU: 0 PID: 14 Comm: pccardd Not tainted 4.0.0-rc6+ #11
Hardware name: Sharp-Collie
[<c0105cd8>] (unwind_backtrace) from [<c0103ef8>] (show_stack+0x10/0x14)
[<c0103ef8>] (show_stack) from [<c010e9b8>] (warn_slowpath_common+0x74/0xac)
[<c010e9b8>] (warn_slowpath_common) from [<c010ea20>] (warn_slowpath_fmt+0x30/0x40)
[<c010ea20>] (warn_slowpath_fmt) from [<c012b1b4>] (__might_sleep+0x84/0xa0)
[<c012b1b4>] (__might_sleep) from [<c040fbb0>] (mutex_lock_nested+0x24/0x388)
[<c040fbb0>] (mutex_lock_nested) from [<c0319eb4>] (pccardd+0xf8/0x3fc)
[<c0319eb4>] (pccardd) from [<c0127370>] (kthread+0xdc/0xfc)
[<c0127370>] (kthread) from [<c01013a8>] (ret_from_fork+0x14/0x2c)
---[ end trace fd94911637eed4ba ]---

This happens due to kthread trying to lock mutex in a TASK_INTERRUPTIBLE
state. Limit TASK_INTERRUPTIBLE task state to the schedule() call only,
so that the rest of the code runs in TASK_RUNNING state.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoum,ethertap: use strncpy
Alan [Wed, 8 Apr 2015 12:59:21 +0000 (13:59 +0100)]
um,ethertap: use strncpy

[um maintainers appear to be vanished]

I can't prove the case pointed out in
https://bugzilla.kernel.org/show_bug.cgi?id=82341
is correct so let us play safe.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers/char: Remove msm_smd_pkt driver
Stephen Boyd [Fri, 10 Apr 2015 23:11:03 +0000 (16:11 -0700)]
drivers/char: Remove msm_smd_pkt driver

This code is no longer used now that mach-msm has been removed.
Delete it.

Cc: David Brown <davidb@codeaurora.org>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vmbus: distribute subchannels among all vcpus
Vitaly Kuznetsov [Thu, 7 May 2015 00:47:46 +0000 (17:47 -0700)]
Drivers: hv: vmbus: distribute subchannels among all vcpus

Primary channels are distributed evenly across all vcpus we have. When the host
asks us to create subchannels it usually makes us num_cpus-1 offers and we are
supposed to distribute the work evenly among the channel itself and all its
subchannels. Make sure they are all assigned to different vcpus.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vmbus: move init_vp_index() call to vmbus_process_offer()
Vitaly Kuznetsov [Thu, 7 May 2015 00:47:45 +0000 (17:47 -0700)]
Drivers: hv: vmbus: move init_vp_index() call to vmbus_process_offer()

We need to call init_vp_index() after we added the channel to the appropriate
list (global or subchannel) to be able to use this information when assigning
the channel to the particular vcpu. To do so we need to move a couple of
functions around. The only real change is the init_vp_index() call. This is a
small refactoring without a functional change.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vmbus: decrease num_sc on subchannel removal
Vitaly Kuznetsov [Thu, 7 May 2015 00:47:44 +0000 (17:47 -0700)]
Drivers: hv: vmbus: decrease num_sc on subchannel removal

It is unlikely that that host will ask us to close only one subchannel for a
device but let's be consistent. Do both num_sc++ and num_sc-- with
channel->lock to be on the safe side.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vmbus: briefly comment num_sc and next_oc
Vitaly Kuznetsov [Thu, 7 May 2015 00:47:43 +0000 (17:47 -0700)]
Drivers: hv: vmbus: briefly comment num_sc and next_oc

next_oc and num_sc fields of struct vmbus_channel deserve a description. Move
them closer to sc_list as these fields are related to it.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vmbus: unify calls to percpu_channel_enq()
Vitaly Kuznetsov [Thu, 7 May 2015 00:47:42 +0000 (17:47 -0700)]
Drivers: hv: vmbus: unify calls to percpu_channel_enq()

Remove some code duplication, no functional change intended.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vmbus: kill tasklets on module unload
Vitaly Kuznetsov [Thu, 7 May 2015 00:47:41 +0000 (17:47 -0700)]
Drivers: hv: vmbus: kill tasklets on module unload

Explicitly kill tasklets we create on module unload.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vmbus: do cleanup on all vmbus_open() failure paths
Vitaly Kuznetsov [Thu, 7 May 2015 00:47:40 +0000 (17:47 -0700)]
Drivers: hv: vmbus: do cleanup on all vmbus_open() failure paths

In case there was an error reported in the response to the CHANNELMSG_OPENCHANNEL
call we need to do the cleanup as a vmbus_open() user won't be doing it after
receiving an error. The cleanup should be done on all failure paths. We also need
to avoid returning open_info->response.open_result.status as the return value as
all other errors we return from vmbus_open() are -EXXX and vmbus_open() callers
are not supposed to analyze host error codes.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vmbus: Implement the protocol for tearing down vmbus state
K. Y. Srinivasan [Thu, 23 Apr 2015 04:31:32 +0000 (21:31 -0700)]
Drivers: hv: vmbus: Implement the protocol for tearing down vmbus state

Implement the protocol for tearing down the monitor state established with
the host.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: hv: vmbus: Get rid of some unused definitions
K. Y. Srinivasan [Thu, 23 Apr 2015 04:31:31 +0000 (21:31 -0700)]
drivers: hv: vmbus: Get rid of some unused definitions

Get rid of some unused definitions.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agohv: vmbus_free_channels(): remove the redundant free_channel()
Dexuan Cui [Thu, 23 Apr 2015 04:31:30 +0000 (21:31 -0700)]
hv: vmbus_free_channels(): remove the redundant free_channel()

free_channel() has been invoked in
vmbus_remove() -> hv_process_channel_removal(), or vmbus_remove() ->
... -> vmbus_close_internal() -> hv_process_channel_removal().

We also change to use list_for_each_entry_safe(), because the entry
is removed in hv_process_channel_removal().

This patch fixes a bug in the vmbus unload path.

Thank Dan Carpenter for finding the issue!

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vmbus: unregister panic notifier on module unload
Vitaly Kuznetsov [Thu, 23 Apr 2015 04:31:29 +0000 (21:31 -0700)]
Drivers: hv: vmbus: unregister panic notifier on module unload

Commit 96c1d0581d00f7abe033350edb021a9d947d8d81 ("Drivers: hv: vmbus: Add
support for VMBus panic notifier handler") introduced
atomic_notifier_chain_register() call on module load. We also need to call
atomic_notifier_chain_unregister() on module unload as otherwise the following
crash is observed when we bring hv_vmbus back:

[   39.788877] BUG: unable to handle kernel paging request at ffffffffa00078a8
[   39.788877] IP: [<ffffffff8109d63f>] notifier_call_chain+0x3f/0x80
...
[   39.788877] Call Trace:
[   39.788877]  [<ffffffff8109de7d>] __atomic_notifier_call_chain+0x5d/0x90
...
[   39.788877]  [<ffffffff8109d788>] ? atomic_notifier_chain_register+0x38/0x70
[   39.788877]  [<ffffffff8109d767>] ? atomic_notifier_chain_register+0x17/0x70
[   39.788877]  [<ffffffffa002814f>] hv_acpi_init+0x14f/0x1000 [hv_vmbus]
[   39.788877]  [<ffffffff81002144>] do_one_initcall+0xd4/0x210

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vmbus: introduce vmbus_acpi_remove
Vitaly Kuznetsov [Thu, 23 Apr 2015 04:31:28 +0000 (21:31 -0700)]
Drivers: hv: vmbus: introduce vmbus_acpi_remove

In case we do request_resource() in vmbus_acpi_add() we need to tear it down
to be able to load the driver again. Otherwise the following crash in observed
when hv_vmbus unload/load sequence is performed on a Generation2 instance:

[   38.165701] BUG: unable to handle kernel paging request at ffffffffa00075a0
[   38.166315] IP: [<ffffffff8107dc5f>] __request_resource+0x2f/0x50
[   38.166315] PGD 1f34067 PUD 1f35063 PMD 3f723067 PTE 0
[   38.166315] Oops: 0000 [#1] SMP
[   38.166315] Modules linked in: hv_vmbus(+) [last unloaded: hv_vmbus]
[   38.166315] CPU: 0 PID: 267 Comm: modprobe Not tainted 3.19.0-rc5_bug923184+ #486
[   38.166315] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v1.0 11/26/2012
[   38.166315] task: ffff88003f401cb0 ti: ffff88003f60c000 task.ti: ffff88003f60c000
[   38.166315] RIP: 0010:[<ffffffff8107dc5f>]  [<ffffffff8107dc5f>] __request_resource+0x2f/0x50
[   38.166315] RSP: 0018:ffff88003f60fb58  EFLAGS: 00010286

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: utils: unify driver registration reporting
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:59 +0000 (18:07 -0700)]
Drivers: hv: utils: unify driver registration reporting

Unify driver registration reporting and move it to debug level as normally daemons write to syslog themselves
and these kernel messages are useless.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: fcopy: full handshake support
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:58 +0000 (18:07 -0700)]
Drivers: hv: fcopy: full handshake support

Introduce FCOPY_VERSION_1 to support kernel replying to the negotiation
message with its own version.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vss: full handshake support
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:57 +0000 (18:07 -0700)]
Drivers: hv: vss: full handshake support

Introduce VSS_OP_REGISTER1 to support kernel replying to the negotiation
message with its own version.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoTools: hv: vss: use misc char device to communicate with kernel
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:56 +0000 (18:07 -0700)]
Tools: hv: vss: use misc char device to communicate with kernel

Use /dev/vmbus/hv_vss instead of netlink.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoTools: hv: kvp: use misc char device to communicate with kernel
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:55 +0000 (18:07 -0700)]
Tools: hv: kvp: use misc char device to communicate with kernel

Use /dev/vmbus/hv_kvp instead of netlink.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: kvp: convert to hv_utils_transport
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:54 +0000 (18:07 -0700)]
Drivers: hv: kvp: convert to hv_utils_transport

Convert to hv_utils_transport to support both netlink and /dev/vmbus/hv_kvp communication methods.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: fcopy: convert to hv_utils_transport
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:53 +0000 (18:07 -0700)]
Drivers: hv: fcopy: convert to hv_utils_transport

Unify the code with the recently introduced hv_utils_transport. Netlink
communication is disabled for fcopy.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vss: convert to hv_utils_transport
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:52 +0000 (18:07 -0700)]
Drivers: hv: vss: convert to hv_utils_transport

Convert to hv_utils_transport to support both netlink and /dev/vmbus/hv_vss communication methods.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: util: introduce hv_utils_transport abstraction
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:51 +0000 (18:07 -0700)]
Drivers: hv: util: introduce hv_utils_transport abstraction

The intention is to make KVP/VSS drivers work through misc char devices.
Introduce an abstraction for kernel/userspace communication to make the
migration smoother. Transport operational mode (netlink or char device)
is determined by the first received message. To support driver upgrades
the switch from netlink to chardev operational mode is supported.

Every hv_util daemon is supposed to register 2 callbacks:
1) on_msg() to get notified when the userspace daemon sent a message;
2) on_reset() to get notified when the userspace daemon drops the connection.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: fcopy: set .owner reference for file operations
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:50 +0000 (18:07 -0700)]
Drivers: hv: fcopy: set .owner reference for file operations

Get an additional reference otherwise a crash is observed when hv_utils module is being unloaded while
fcopy daemon is still running. .owner gives us an additional reference when
someone holds a descriptor for the device.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: fcopy: switch to using the hvutil_device_state state machine
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:49 +0000 (18:07 -0700)]
Drivers: hv: fcopy: switch to using the hvutil_device_state state machine

Switch to using the hvutil_device_state state machine from using 3 different state variables:
fcopy_transaction.active, opened, and in_hand_shake.

State transitions are:
-> HVUTIL_DEVICE_INIT when driver loads or on device release
-> HVUTIL_READY if the handshake was successful
-> HVUTIL_HOSTMSG_RECEIVED when there is a non-negotiation message from the host
-> HVUTIL_USERSPACE_REQ after userspace daemon read the message
   -> HVUTIL_USERSPACE_RECV after/if userspace has replied
-> HVUTIL_READY after we respond to the host
-> HVUTIL_DEVICE_DYING on driver unload

In hv_fcopy_onchannelcallback() process ICMSGTYPE_NEGOTIATE messages even when
the userspace daemon is disconnected, otherwise we can make the host think
we don't support FCOPY and disable the service completely.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vss: switch to using the hvutil_device_state state machine
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:48 +0000 (18:07 -0700)]
Drivers: hv: vss: switch to using the hvutil_device_state state machine

Switch to using the hvutil_device_state state machine from using kvp_transaction.active.

State transitions are:
-> HVUTIL_DEVICE_INIT when driver loads or on device release
-> HVUTIL_READY if the handshake was successful
-> HVUTIL_HOSTMSG_RECEIVED when there is a non-negotiation message from the host
-> HVUTIL_USERSPACE_REQ after we sent the message to the userspace daemon
   -> HVUTIL_USERSPACE_RECV after/if the userspace daemon has replied
-> HVUTIL_READY after we respond to the host
-> HVUTIL_DEVICE_DYING on driver unload

In hv_vss_onchannelcallback() process ICMSGTYPE_NEGOTIATE messages even when
the userspace daemon is disconnected, otherwise we can make the host think
we don't support VSS and disable the service completely.

Unfortunately there is no good way we can figure out that the userspace daemon
has died (unless we start treating all timeouts as such), add a protection
against processing new VSS_OP_REGISTER messages while being in the middle of a
transaction (HVUTIL_USERSPACE_REQ or HVUTIL_USERSPACE_RECV state).

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: kvp: switch to using the hvutil_device_state state machine
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:47 +0000 (18:07 -0700)]
Drivers: hv: kvp: switch to using the hvutil_device_state state machine

Switch to using the hvutil_device_state state machine from using 2 different state variables: kvp_transaction.active and
in_hand_shake.

State transitions are:
-> HVUTIL_DEVICE_INIT when driver loads or on device release
-> HVUTIL_READY if the handshake was successful
-> HVUTIL_HOSTMSG_RECEIVED when there is a non-negotiation message from the host
-> HVUTIL_USERSPACE_REQ after we sent the message to the userspace daemon
   -> HVUTIL_USERSPACE_RECV after/if the userspace daemon has replied
-> HVUTIL_READY after we respond to the host
-> HVUTIL_DEVICE_DYING on driver unload

In hv_kvp_onchannelcallback() process ICMSGTYPE_NEGOTIATE messages even when
the userspace daemon is disconnected, otherwise we can make the host think
we don't support KVP and disable the service completely.

Unfortunately there is no good way we can figure out that the userspace daemon
has died (unless we start treating all timeouts as such). In case the daemon
restarts we skip the negotiation procedure (so the daemon is supposed to has
the same version). This behavior is unchanged from in_handshake approach.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: util: introduce state machine for util drivers
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:46 +0000 (18:07 -0700)]
Drivers: hv: util: introduce state machine for util drivers

KVP/VSS/FCOPY drivers work in fully serialized mode: we wait till userspace
daemon registers, wait for a message from the host, send this message to the
daemon, get the reply, send it back to host, wait for another message.
Introduce enum hvutil_device_state to represend this state in all 3 drivers.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: fcopy: rename fcopy_work -> fcopy_timeout_work
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:45 +0000 (18:07 -0700)]
Drivers: hv: fcopy: rename fcopy_work -> fcopy_timeout_work

'fcopy_work' (and fcopy_work_func) is a misnomer as it sounds like we expect
this useful work to happen and in reality it is just an emergency escape when
timeout happens.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: kvp: rename kvp_work -> kvp_timeout_work
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:44 +0000 (18:07 -0700)]
Drivers: hv: kvp: rename kvp_work -> kvp_timeout_work

'kvp_work' (and kvp_work_func) is a misnomer as it sounds like we expect
this useful work to happen and in reality it is just an emergency escape when
timeout happens.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: vss: process deferred messages when we complete the transaction
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:43 +0000 (18:07 -0700)]
Drivers: hv: vss: process deferred messages when we complete the transaction

In theory, the host is not supposed to issue any requests before be reply to
the previous one. In KVP we, however, support the following scenarios:
1) A message was received before userspace daemon registered;
2) A message was received while the previous one is still being processed.
In VSS we support only the former. Add support for the later, use
hv_poll_channel() to do the job.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: fcopy: process deferred messages when we complete the transaction
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:42 +0000 (18:07 -0700)]
Drivers: hv: fcopy: process deferred messages when we complete the transaction

In theory, the host is not supposed to issue any requests before be reply to
the previous one. In KVP we, however, support the following scenarios:
1) A message was received before userspace daemon registered;
2) A message was received while the previous one is still being processed.
In FCOPY we support only the former. Add support for the later, use
hv_poll_channel() to do the job.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: kvp: move poll_channel() to hyperv_vmbus.h
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:41 +0000 (18:07 -0700)]
Drivers: hv: kvp: move poll_channel() to hyperv_vmbus.h

Move poll_channel() to hyperv_vmbus.h and make it inline and rename it to hv_poll_channel() so it can be reused
in other hv_util modules.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: kvp: reset kvp_context
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:40 +0000 (18:07 -0700)]
Drivers: hv: kvp: reset kvp_context

We set kvp_context when we want to postpone receiving a packet from vmbus due
to the previous transaction being unfinished. We, however, never reset this
state, all consequent kvp_respond_to_host() calls will result in poll_channel()
calling hv_kvp_onchannelcallback(). This doesn't cause real issues as:
1) Host is supposed to serialize transactions as well
2) If no message is pending vmbus_recvpacket() will return 0 recvlen.
This is just a cleanup.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDrivers: hv: util: move kvp/vss function declarations to hyperv_vmbus.h
Vitaly Kuznetsov [Sun, 12 Apr 2015 01:07:39 +0000 (18:07 -0700)]
Drivers: hv: util: move kvp/vss function declarations to hyperv_vmbus.h

These declarations are internal to hv_util module and hv_fcopy_* declarations
already reside there.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoti-st: handle null allocation return correctly.
Colin Ian King [Tue, 12 May 2015 21:37:23 +0000 (22:37 +0100)]
ti-st: handle null allocation return correctly.

static analysis with smatch picked up the following error:

get_platform_data() error: potential null dereference 'dt_pdata'.
  (kzalloc returns null)

Instead, the code should return NULL to avoid the following null
pointer deference.  Also, remove the error message as it is
redundant, the caller emits an error message to alert of a
failure anyhow.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agocheckkconfigsymbols.py: set python2 as default interpreter
Valentin Rothberg [Wed, 13 May 2015 08:40:52 +0000 (10:40 +0200)]
checkkconfigsymbols.py: set python2 as default interpreter

Some more recent distributions set the default interpreter to python3,
causing the script to break since it's written for python2.

Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agocheckkconfigsymbols.py: add option -i to ignore files
Valentin Rothberg [Wed, 29 Apr 2015 14:58:27 +0000 (16:58 +0200)]
checkkconfigsymbols.py: add option -i to ignore files

Sometimes a user might be interested to filter certain reports (e.g.,
the many defconfigs).  Now, this can be achieved by specifying a Python
regex with -i / --ignore.

Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomisc: mic: add support for loading/unloading SCIF driver
Sudeep Dutt [Wed, 29 Apr 2015 12:32:40 +0000 (05:32 -0700)]
misc: mic: add support for loading/unloading SCIF driver

modprobe SCIF driver upon start and remove it upon unload

Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-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>
9 years agomisc: mic: MIC card driver specific changes to enable SCIF
Sudeep Dutt [Wed, 29 Apr 2015 12:32:39 +0000 (05:32 -0700)]
misc: mic: MIC card driver specific changes to enable SCIF

MIC card driver specific changes to enable SCIF. This patch implements
the SCIF hardware bus operations and registers a SCIF device on the
SCIF hardware bus.

Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
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>
9 years agomisc: mic: MIC host driver specific changes to enable SCIF
Sudeep Dutt [Wed, 29 Apr 2015 12:32:38 +0000 (05:32 -0700)]
misc: mic: MIC host driver specific changes to enable SCIF

MIC host driver specific changes to enable SCIF. This patch implements
the SCIF hardware bus operations and registers a SCIF device on the
SCIF hardware bus.

Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-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>
9 years agomisc: mic: SCIF messaging and node enumeration APIs
Sudeep Dutt [Wed, 29 Apr 2015 12:32:37 +0000 (05:32 -0700)]
misc: mic: SCIF messaging and node enumeration APIs

SCIF messaging APIs which allow sending messages between the SCIF
endpoints via a byte stream based ring buffer which has been
optimized to avoid reads across PCIe. The SCIF messaging APIs
are typically used for short < 1024 byte messages for best
performance while the RDMA APIs which will be submitted in a future
patch series is recommended for larger transfers. The node
enumeration API enables a user to query for the number of nodes
online in the SCIF network and their node ids.

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomisc: mic: SCIF connections APIs i.e. accept and connect
Nikhil Rao [Wed, 29 Apr 2015 12:32:36 +0000 (05:32 -0700)]
misc: mic: SCIF connections APIs i.e. accept and connect

SCIF connection APIs which establish a SCIF connection between
a pair of SCIF endpoints. A SCIF connection consists of a
dedicated queue-pair between the endpoints. Client messages are
sent over the queue-pair whereas the signaling associated with the
message is multiplexed over the node queue-pair. Similarly other
control messages such as exposing registered memory are also sent
over the node queue-pair. The SCIF endpoints must be in connected
state to exchange messages, register memory, map remote memory and
trigger DMA transfers. SCIF connections can be set up
asynchronously or synchronously.

Thanks to Johnnie S Peters for authoring parts of this patch during
early bring up of the SCIF driver.

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomisc: mic: SCIF open close bind and listen APIs
Sudeep Dutt [Wed, 29 Apr 2015 12:32:35 +0000 (05:32 -0700)]
misc: mic: SCIF open close bind and listen APIs

SCIF character device file operations and kernel APIs for opening and
closing a user and kernel mode SCIF endpoint. This patch also enables
binding to a SCIF port and listening for incoming SCIF connections.

Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-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>
9 years agomisc: mic: SCIF node queue pair setup management
Sudeep Dutt [Wed, 29 Apr 2015 12:32:34 +0000 (05:32 -0700)]
misc: mic: SCIF node queue pair setup management

SCIF node queue pair setup creates the SCIF driver kernel
mode private node queue pairs between all the nodes to enable
internal control message communication once SCIF gets probed
by the SCIF hardware bus. Peer to peer communication between
MIC Coprocessor nodes is supported.

Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-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>
9 years agomisc: mic: SCIF module initialization
Sudeep Dutt [Wed, 29 Apr 2015 12:32:33 +0000 (05:32 -0700)]
misc: mic: SCIF module initialization

SCIF module initialization, DMA mapping, ioremap wrapper APIs
and debugfs hooks. SCIF gets probed by the SCIF hardware bus
if SCIF devices were registered by base drivers. A MISC device
is registered to provide the SCIF character device interface.

Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-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>
9 years agomisc: mic: Common MIC header file changes in preparation for SCIF
Sudeep Dutt [Wed, 29 Apr 2015 12:32:32 +0000 (05:32 -0700)]
misc: mic: Common MIC header file changes in preparation for SCIF

Update mic_bootparam and define the maximum number of DMA channels

Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-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>
9 years agomisc: mic: SCIF Peer Bus
Sudeep Dutt [Wed, 29 Apr 2015 12:32:31 +0000 (05:32 -0700)]
misc: mic: SCIF Peer Bus

The SCIF peer bus is used to register and unregister SCIF peer devices
internally by the SCIF driver to signify the addition and removal of
peer nodes respectively from the SCIF network. This simplifies remote node
handling within SCIF and will also be used to support device probe/remove
for SCIF client drivers (e.g. netdev over SCIF)

Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-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>
9 years agomisc: mic: SCIF Hardware Bus
Sudeep Dutt [Wed, 29 Apr 2015 12:32:30 +0000 (05:32 -0700)]
misc: mic: SCIF Hardware Bus

The SCIF hardware bus abstracts the low level hardware driver details
like interrupts and mapping remote memory so that the same SCIF driver
can work without any changes with the MIC host or card driver as long
as the hardware bus operations are implemented. The SCIF hardware
device is registered by the host and card drivers on the SCIF hardware
bus resulting in probing the SCIF driver.

Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-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>
9 years agomisc: mic: SCIF ring buffer infrastructure
Sudeep Dutt [Wed, 29 Apr 2015 12:32:29 +0000 (05:32 -0700)]
misc: mic: SCIF ring buffer infrastructure

SCIF ring buffer is a single producer, single consumer byte stream
ring buffer optimized for avoiding reads across the PCIe bus while
adding the required barriers and hardware workarounds for the MIC
Coprocessor. The ring buffer is used to implement a receive queue for
SCIF driver messaging between two nodes and for byte stream messaging
between SCIF endpoints. The existing in-kernel ring buffer was not
reused since it has not been designed for our use across the PCIe bus
where each node runs an independent OS. Each SCIF node has a receive
queue for every other SCIF node, and each connected endpoint has a
receive queue for messages from its peer. This pair of receive
queues is referred to as a SCIF queue pair.

Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-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>
9 years agomisc: mic: SCIF header file and IOCTL interface
Sudeep Dutt [Wed, 29 Apr 2015 12:32:28 +0000 (05:32 -0700)]
misc: mic: SCIF header file and IOCTL interface

This patch introduces the SCIF documentation in the header file
and describes the IOCTL interface for user mode. mic_overview.txt
is updated with documentation on SCIF and a new document
describing SCIF in more details is available in scif_overview.txt.

Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-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>
9 years agomisc: remove drivers for CARMA hardware
Ira Snyder [Sat, 2 May 2015 17:05:59 +0000 (10:05 -0700)]
misc: remove drivers for CARMA hardware

The CARMA project has ended, and the hardware has all been moved into
storage. It is unlikely to ever be used again.

Remove the drivers so that there is no more maintenance burden from
ongoing upstream kernel changes.

Signed-off-by: Ira W. Snyder <ira.snyder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: char: misc.c: remove trailing whitespace
Tal Shorer [Fri, 1 May 2015 11:53:09 +0000 (14:53 +0300)]
drivers: char: misc.c: remove trailing whitespace

Remove trailing whitespace from several lines in drivers/char/misc.c
This was done using scripts/cleanfile

Signed-off-by: Tal Shorer <tal.shorer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agow1: Add support for DS28EA00 sequence to w1-therm
Matt Campbell [Tue, 28 Apr 2015 11:44:17 +0000 (07:44 -0400)]
w1: Add support for DS28EA00 sequence to w1-therm

This patch provides support for the DS28EA00 digital thermometer.

The DS28EA00 provides an additional two pins for implementing a sequence
detection algorithm.  This feature allows you to determine the physical
location of the chip in the 1-wire bus without needing pre-existing
knowledge of the bus ordering.  Support is provided through the sysfs
w1_seq file.  The file will contain a single line with an integer value
representing the device index in the bus starting at 0.

Signed-off-by: Matt Campbell <mattrcampbell@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agow1_therm reference count family data
David Fries [Sat, 9 May 2015 00:51:50 +0000 (19:51 -0500)]
w1_therm reference count family data

A temperature conversion can take 750 ms and when possible the
w1_therm slave driver drops the bus_mutex to allow other bus
operations, but that includes operations such as a periodic slave
search, which can remove this slave when it is no longer detected.
If that happens the sl->family_data will be freed and set to NULL
causing w1_slave_show to crash when it wakes up.

Signed-off-by: David Fries <David@Fries.net>
Reported-By: Thorsten Bschorr <thorsten@bschorr.de>
Tested-by: Thorsten Bschorr <thorsten@bschorr.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agow1: introduce an ability to specify microseconds bus scanning intervals
Dmitry Khromov [Tue, 12 May 2015 19:29:44 +0000 (22:29 +0300)]
w1: introduce an ability to specify microseconds bus scanning intervals

Some of 1-Wire devices commonly associated with physical access control
systems are attached/generate presence for as short as 100 ms - hence
the tens-to-hundreds milliseconds scan intervals are required.

Signed-off-by: Dmitry Khromov <dk@icelogic.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agolz4: fix system halt at boot kernel on x86_64
Krzysztof Kolasa [Mon, 4 May 2015 03:58:59 +0000 (22:58 -0500)]
lz4: fix system halt at boot kernel on x86_64

Sometimes, on x86_64, decompression fails with the following
error:

Decompressing Linux...

Decoding failed

 -- System halted

This condition is not needed for a 64bit kernel(from commit d5e7caf):

if( ... ||
    (op + COPYLENGTH) > oend)
    goto _output_error

macro LZ4_SECURE_COPY() tests op and does not copy any data
when op exceeds the value.

added by analogy to lz4_uncompress_unknownoutputsize(...)

Signed-off-by: Krzysztof Kolasa <kkolasa@winsoft.pl>
Tested-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Tested-by: Caleb Jorden <cjorden@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agospmi: Add dependency on HAS_IOMEM
Richard Weinberger [Mon, 4 May 2015 19:00:46 +0000 (21:00 +0200)]
spmi: Add dependency on HAS_IOMEM

Not all architectures have io memory.

Fixes:
drivers/built-in.o: In function `spmi_pmic_arb_probe':
spmi-pmic-arb.c:(.text+0x1ed399): undefined reference to `devm_ioremap_resource'

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agouio: don't free irq that was not requested
Stephen Hemminger [Thu, 14 May 2015 16:19:13 +0000 (09:19 -0700)]
uio: don't free irq that was not requested

UIO base driver should only free_irq that it has requested.
UIO supports drivers without interrupts (irq == 0) or custom handlers.

This fixes warnings like:

WARNING: CPU: 1 PID: 5478 at kernel/irq/manage.c:1244 __free_irq+0xa9/0x1e0()
Trying to free already-free IRQ 0

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomei: export hbm features to debugfs under devstate
Tomas Winkler [Thu, 21 May 2015 10:35:48 +0000 (13:35 +0300)]
mei: export hbm features to debugfs under devstate

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomei: export mei client device struct to external use
Tomas Winkler [Thu, 7 May 2015 12:54:07 +0000 (15:54 +0300)]
mei: export mei client device struct to external use

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoNFC: mei_phy: adjust mei nfc header according the spec
Tomas Winkler [Thu, 7 May 2015 12:54:06 +0000 (15:54 +0300)]
NFC: mei_phy: adjust mei nfc header according the spec

1. mei_nfc_hci_hdr and mei_nfc_hdr are just the same thing so drop one
2. use mei_nfc_hdr structure as the member of the command and the reply
instead of replicating all header fields.
3. dump the header for easier debugging

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomei: bus: kill mei_cl_ops
Tomas Winkler [Thu, 7 May 2015 12:54:05 +0000 (15:54 +0300)]
mei: bus: kill mei_cl_ops

since we move all nfc hanling to the mei_phy module
we can kill mei_cl_ops

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoNFC: mei_phy: move all nfc logic from mei driver to nfc
Tomas Winkler [Thu, 7 May 2015 12:54:04 +0000 (15:54 +0300)]
NFC: mei_phy: move all nfc logic from mei driver to nfc

move nfc logic to mei_phy module, we prefer as much as
possible not to deal with a particualr client protocol
in the mei generic infrasutcutre

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomei: bus: add name and uuid into device attributes
Tomas Winkler [Thu, 7 May 2015 12:54:03 +0000 (15:54 +0300)]
mei: bus: add name and uuid into device attributes

Export name and uuid via sysfs and uevent

Cc: linux-api@vger.kernel.org
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomei: bus: report also uuid in module alias
Tomas Winkler [Thu, 7 May 2015 12:54:02 +0000 (15:54 +0300)]
mei: bus: report also uuid in module alias

In order to automate modules matching add device uuid
which is reported in client enumeration, keep also
the name that is needed in for nfc distinguishing radio vendor

Report mei:name:uuid

Cc: linux-api@vger.kernel.org
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomei: add also write waiting list to runtime pm blockers
Tomas Winkler [Thu, 7 May 2015 12:54:00 +0000 (15:54 +0300)]
mei: add also write waiting list to runtime pm blockers

The io callback is clear from write_waitling_list after
we receive interrupt from the hw to ack the write completion.
We need to wait for this interrupt deliver before we try
to enter low power state

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomei: request autosuspend at the end of write
Alexander Usyskin [Thu, 7 May 2015 12:53:59 +0000 (15:53 +0300)]
mei: request autosuspend at the end of write

On longer non-blocking write might not complete at the end of
autosuspend expiration, therefore we request autosuspend
again on the write completion.

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>
9 years agomei: consume flow control on the first chunk of writing
Alexander Usyskin [Thu, 7 May 2015 12:53:58 +0000 (15:53 +0300)]
mei: consume flow control on the first chunk of writing

Consume the write flow control on the first chunk of the write instead
of on the buffer completion.
We can safely assume that the consequent chunks have the flow control
granted.

This addresses two issues:

1. Blocks other callbacks from the same client riding on the client's
flow control and prevents interleaving of messages as FW cannot distinguish
between two messages from the same client.

2. Fixes single buffer flow control arbitration in a clean way, without
connection/disconnection book keeping

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>
9 years agomei: debug prints with client info in read
Alexander Usyskin [Mon, 4 May 2015 06:44:00 +0000 (09:44 +0300)]
mei: debug prints with client info in read

Add client info to debug prints in the read function to
ease on debugging efforts.

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>
9 years agomei: txe: fix incorrect indentation
Tomas Winkler [Mon, 4 May 2015 06:43:59 +0000 (09:43 +0300)]
mei: txe: fix incorrect indentation

Remove spurious blank

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomei: drop iamthif_mtu from device structure
Alexander Usyskin [Mon, 4 May 2015 06:43:58 +0000 (09:43 +0300)]
mei: drop iamthif_mtu from device structure

We can receive mtu with one call now, no need to store it.

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>
9 years agomei: connection to fixed address clients from user-space
Alexander Usyskin [Mon, 4 May 2015 06:43:57 +0000 (09:43 +0300)]
mei: connection to fixed address clients from user-space

This should be used for debug only.
The feaure is gated by "allow_fixed_address" control exposed in debugfs.

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>
9 years agomei: support for fixed address clients
Alexander Usyskin [Mon, 4 May 2015 06:43:56 +0000 (09:43 +0300)]
mei: support for fixed address clients

Fixed address is simplified FW client that doesn't require
connection and doesn't support flow control.
So it can be only one host client per fixed FW client.
Fixed client access is available only for drivers on mei bus,
connection from user-space is blocked.

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>
9 years agomei: fix flow control for single buffer clients
Alexander Usyskin [Mon, 4 May 2015 06:43:55 +0000 (09:43 +0300)]
mei: fix flow control for single buffer clients

For ME clients that use single receiving buffer
the driver tracks credentials on mei_me_clients structure
for all connections. The driver needs to book keep the shared
resource correctly and track the connections, particularly
the credit has to be cleaned when there is no active connection
to a particular me client. This solves issue when subsequent
connection will not get an ill impression that it can write.

We add active connection counter the particular ME client and
when the counter reach zero, we clear the credits.

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>
9 years agomei: add a reference from the host client to the me client
Alexander Usyskin [Mon, 4 May 2015 06:43:54 +0000 (09:43 +0300)]
mei: add a reference from the host client to the me client

Keep a pointer to associated me client in the host client object to
eliminate me client searches. Check if the me client is active in the
firmware by checking if its is linked on the me clients list
Add accessors for the me client properties from host client.

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>
9 years agomei: revamp client connection
Tomas Winkler [Mon, 4 May 2015 06:43:53 +0000 (09:43 +0300)]
mei: revamp client connection

Simplify connect state machine by changing the logic around
Connection request in progress - only check if we have a callback in
relevant queue.
Extract common code into mei_cl_send_connect() function

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomei: revamp client disconnection flow
Tomas Winkler [Mon, 4 May 2015 06:43:52 +0000 (09:43 +0300)]
mei: revamp client disconnection flow

Split disconnected state into two parts first reception disconnect
response from the firmware and second actually setting of disconnected
state.  Book keeping data are needed for processing and after firmware
disconnected the client and are cleaned when setting the disconnected
state in mei_cl_set_disconneted() function.
Add mei_cl_send_disconnect to reduce code duplication.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agomei: txe: reduce suspend/resume time
Tomas Winkler [Tue, 14 Apr 2015 07:27:26 +0000 (10:27 +0300)]
mei: txe: reduce suspend/resume time

HW has to be in known state before the initialisation
sequence is started. The polling step for settling aliveness
was set to 200ms while in practise this can be done in up to 30msecs.

Cc: <stable@vger.kernel.org> #3.18+
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Barak Yoresh <barak.yoresh@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>