[PATCH v3 19/21] Drivers: hv: vss: full handshake support

2015-04-09 Thread Vitaly Kuznetsov
Introduce VSS_OP_REGISTER1 to support kernel replying to the negotiation message with its own version. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/hv_snapshot.c| 49 ++--- include/uapi/linux/hyperv.h | 5 + tools/hv/hv_vss_daemon.c| 14

Re: [PATCH 12/14] i2c-parport: return proper error values from attach

2015-04-09 Thread Wolfram Sang
On Wed, Apr 08, 2015 at 04:50:38PM +0530, Sudip Mukherjee wrote: > now that we are monitoring the return value from attach, make the > required changes to return proper value from its attach function. > > Signed-off-by: Sudip Mukherjee > --- > drivers/i2c/busses/i2c-parport.c | 7 --- > 1 fi

Re: [PATCH] hv: vmbus_free_channels(): remove the redundant free_channel()

2015-04-09 Thread Greg KH
On Thu, Apr 09, 2015 at 09:15:30AM +, Dexuan Cui wrote: > > -Original Message- > > From: Greg KH [mailto:gre...@linuxfoundation.org] > > Sent: Thursday, April 9, 2015 17:07 > > To: Dexuan Cui > > Cc: linux-ker...@vger.kernel.org; driverdev-devel@linuxdriverproject.org; > > o...@aepfle.d

[PATCH v3 07/21] Drivers: hv: fcopy: rename fcopy_work -> fcopy_timeout_work

2015-04-09 Thread Vitaly Kuznetsov
'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 --- drivers/hv/hv_fcopy.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(

[PATCH v3 10/21] Drivers: hv: vss: switch to using the hvutil_device_state state machine

2015-04-09 Thread Vitaly Kuznetsov
... 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 mess

[PATCH v3 14/21] Drivers: hv: vss: convert to hv_utils_transport

2015-04-09 Thread Vitaly Kuznetsov
... to support both netlink and /dev/vmbus/hv_vss communication methods. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/hv_snapshot.c | 52 +--- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/drivers/hv/hv_snapshot.c b/drivers/hv/hv_sn

[PATCH] Staging: comedi: daqboard2000.c fixed trailing whitespace

2015-04-09 Thread Andrei Maresu
Fixed a coding style issue. Signed-off-by: Andrei Maresu --- drivers/staging/comedi/drivers/daqboard2000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c index 96697fb..e6746dc 100

[PATCH v3 20/21] Drivers: hv: fcopy: full handshake support

2015-04-09 Thread Vitaly Kuznetsov
Introduce FCOPY_VERSION_1 to support kernel replying to the negotiation message with its own version. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/hv_fcopy.c | 16 +++- include/uapi/linux/hyperv.h | 3 ++- tools/hv/hv_fcopy_daemon.c | 15 +++ 3 files changed, 32

[PATCH v3 09/21] Drivers: hv: kvp: switch to using the hvutil_device_state state machine

2015-04-09 Thread Vitaly Kuznetsov
... 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

[PATCH v3 18/21] Tools: hv: vss: use misc char device to communicate with kernel

2015-04-09 Thread Vitaly Kuznetsov
Use /dev/vmbus/hv_vss instead of netlink. Signed-off-by: Vitaly Kuznetsov --- tools/hv/hv_vss_daemon.c | 139 +-- 1 file changed, 25 insertions(+), 114 deletions(-) diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c index 506dd01..36f182

[PATCH v3 17/21] Tools: hv: kvp: use misc char device to communicate with kernel

2015-04-09 Thread Vitaly Kuznetsov
Use /dev/vmbus/hv_kvp instead of netlink. Signed-off-by: Vitaly Kuznetsov --- tools/hv/hv_kvp_daemon.c | 166 +-- 1 file changed, 31 insertions(+), 135 deletions(-) diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c index 408bb07..0d9f48

[PATCH v3 01/21] Drivers: hv: util: move kvp/vss function declarations to hyperv_vmbus.h

2015-04-09 Thread Vitaly Kuznetsov
These declarations are internal to hv_util module and hv_fcopy_* declarations already reside there. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/hv_kvp.c | 1 + drivers/hv/hv_snapshot.c | 2 ++ drivers/hv/hyperv_vmbus.h | 8 include/linux/hyperv.h| 7 --- 4 files change

[PATCH v3 04/21] Drivers: hv: fcopy: process deferred messages when we complete the transaction

2015-04-09 Thread Vitaly Kuznetsov
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 su

[PATCH 3.4 114/176] x86, hyperv: Mark the Hyper-V clocksource as being continuous

2015-04-09 Thread lizf
From: "K. Y. Srinivasan" 3.4.107-rc1 review patch. If anyone has any objections, please let me know. -- commit 32c6590d126836a062b3140ed52d898507987017 upstream. The Hyper-V clocksource is continuous; mark it accordingly. Signed-off-by: K. Y. Srinivasan Acked-by: jasow...@r

[PATCH v3 03/21] Drivers: hv: kvp: move poll_channel() to hyperv_vmbus.h

2015-04-09 Thread Vitaly Kuznetsov
..., 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 --- drivers/hv/hv_kvp.c | 17 +++-- drivers/hv/hyperv_vmbus.h | 12 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a

[PATCH v3 21/21] Drivers: hv: utils: unify driver registration reporting

2015-04-09 Thread Vitaly Kuznetsov
... and move it to debug level as normally daemons write to syslog themselves and these kernel messages are useless. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/hv_fcopy.c| 3 +-- drivers/hv/hv_kvp.c | 3 ++- drivers/hv/hv_snapshot.c | 2 +- 3 files changed, 4 insertions(+), 4 deleti

[PATCH v3 15/21] Drivers: hv: fcopy: convert to hv_utils_transport

2015-04-09 Thread Vitaly Kuznetsov
Unify the code with the recently introduced hv_utils_transport. Netlink communication is disabled for fcopy. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/hv_fcopy.c | 194 -- 1 file changed, 46 insertions(+), 148 deletions(-) diff --git a/driver

[PATCH v3 02/21] Drivers: hv: kvp: reset kvp_context

2015-04-09 Thread Vitaly Kuznetsov
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 issue

RE: [PATCH] hv: vmbus_free_channels(): remove the redundant free_channel()

2015-04-09 Thread Dexuan Cui
Thanks, -- Dexuan > -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Thursday, April 9, 2015 17:22 > To: Dexuan Cui > Cc: linux-ker...@vger.kernel.org; driverdev-devel@linuxdriverproject.org; > o...@aepfle.de; a...@canonical.com; jasow...@redhat.com; KY Srin

Re: [PATCH] hv: vmbus_free_channels(): remove the redundant free_channel()

2015-04-09 Thread Greg KH
On Wed, Apr 08, 2015 at 11:13:47PM -0700, Dexuan Cui wrote: > 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

RE: [PATCH] hv: vmbus_free_channels(): remove the redundant free_channel()

2015-04-09 Thread Dexuan Cui
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Thursday, April 9, 2015 17:07 > To: Dexuan Cui > Cc: linux-ker...@vger.kernel.org; driverdev-devel@linuxdriverproject.org; > o...@aepfle.de; a...@canonical.com; jasow...@redhat.com; KY Srinivasan; > vkuzn...@re

Re: [PATCH 12/14] i2c-parport: return proper error values from attach

2015-04-09 Thread Jean Delvare
On Thu, 9 Apr 2015 09:13:07 +0200, Wolfram Sang wrote: > On Wed, Apr 08, 2015 at 04:50:38PM +0530, Sudip Mukherjee wrote: > > now that we are monitoring the return value from attach, make the > > required changes to return proper value from its attach function. > > > > Signed-off-by: Sudip Mukherj

Re: [PATCH 12/14] i2c-parport: return proper error values from attach

2015-04-09 Thread Wolfram Sang
> It doesn't really matter that the error codes are different, it matters > that they are meaningful. As much as possible you should pass error > codes from the lower layers. parport_claim_or_block() and > i2c_bit_add_bus() return proper error codes so you should record and > transmit them. Oh, s

[PATCH v3 13/21] Drivers: hv: util: introduce hv_utils_transport abstraction

2015-04-09 Thread Vitaly Kuznetsov
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

[PATCH v3 16/21] Drivers: hv: kvp: convert to hv_utils_transport

2015-04-09 Thread Vitaly Kuznetsov
... to support both netlink and /dev/vmbus/hv_kvp communication methods. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/hv_kvp.c | 91 + 1 file changed, 42 insertions(+), 49 deletions(-) diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c

[PATCH v3 11/21] Drivers: hv: fcopy: switch to using the hvutil_device_state state machine

2015-04-09 Thread Vitaly Kuznetsov
... 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 fr

[PATCH v3 06/21] Drivers: hv: kvp: rename kvp_work -> kvp_timeout_work

2015-04-09 Thread Vitaly Kuznetsov
'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 --- drivers/hv/hv_kvp.c | 16 1 file changed, 8 insertions(+), 8 deletions(-)

[PATCH v3 12/21] Drivers: hv: fcopy: set .owner reference for file operations

2015-04-09 Thread Vitaly Kuznetsov
... 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 --- drivers/hv/hv_fcopy.c | 6 ++ 1 file changed, 2 insertions

[PATCH v3 08/21] Drivers: hv: util: introduce state machine for util drivers

2015-04-09 Thread Vitaly Kuznetsov
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

[PATCH v3 00/21] Drivers: hv: utils: re-implement the kernel/userspace communication layer

2015-04-09 Thread Vitaly Kuznetsov
Changes in v3: - Removed RFC from subject, rebased on top of current char-misc-next tree. RFCv2: http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2015-March/066629.html Anatomy of the series: Patches 01 - 07 are cleanup with minor functional change. Patch 08 defines the state ma

[PATCH v3 05/21] Drivers: hv: vss: process deferred messages when we complete the transaction

2015-04-09 Thread Vitaly Kuznetsov
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 supp