dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

1203 Commits

Author SHA1 Message Date
Haiyang Zhang bf769375c9 staging: hv: fix the return status of netvsc_start_xmit()
Fix the return status, so the upper layer will retry if transmission
fails.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:19 -07:00
Haiyang Zhang 8a5f9edc4d staging: hv: fix counting of available buffer slots when send fails
Because the number of available buffer slots doesn't decrease for failed
sends, we should not call netvsc_xmit_completion(), which increase the
count of available slots. In this failed case, just free the memory is
enough.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:19 -07:00
Haiyang Zhang 7db1d946c4 staging: hv: fix counting of #outstanding-sends in failed sends
If the packet failed to be sent, we shouldn't count it as the
number of outstanding sends.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:18 -07:00
Haiyang Zhang 692e084e77 staging: hv: re-order the code in netvsc_probe()
Re-order the code in netvsc_probe() to prevent a guest crash caused by
packets possibly received from NetVSP before call to register_netdev().

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:18 -07:00
Haiyang Zhang c4b6a2eaf1 staging: hv: fix a kernel warning in netvsc_linkstatus_callback()
netif_notify_peers() caused a kernel warning in netvsc_linkstatus_callback(),
because netvsc_linkstatus_callback() is within IRQ context. So we move
the first call to netif_notify_peers() into queued work as well, but with
zero delay.

In addition to "staging-next", this should also be back-ported to stable
kernels 2.6.32 and later.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:18 -07:00
Haiyang Zhang d987115871 staging: hv: convert dev_<loglevel> to netdev_<loglevel> in netvsc
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:17 -07:00
Haiyang Zhang c909ebbd0d staging: hv: add newline to log messages in netvsc
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:17 -07:00
Haiyang Zhang a3e8095886 staging: hv: remove unnecessary includes in netvsc
hyperv.h is included by hyperv_net.h already, so no need to include it
again in these C files.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:17 -07:00
K. Y. Srinivasan 24326039b9 Staging: hv: vmbus: Cleanup the code in process_chn_event()
A channel in Hyper-V is equivalent to a device. Thus, a channel is
persistent once it is presented to the guest, even if the driver
managing this device is unloaded. By checking and invoking the driver
specific callback function under the protection of the channel
inbound_lock, we can properly deal with racing driver unloads since an
unloading driver sets the callback to NULL under the protection of this
inbound_lock.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:53:51 -07:00
K. Y. Srinivasan 7341d908af Staging: hv: vmbus: Check for events before messages
The Windows team has informed us that on Windows guests on Hyper-V,
they check for events before messages. They also recommended that we do
the same. This patch addresses this.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:53:51 -07:00
K. Y. Srinivasan 8b9987e905 Staging: hv: vmbus: Fix a bug in error handling in vmbus_bus_init()
Fix a bug in error handling in vmbus_bus_init().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:53:51 -07:00
K. Y. Srinivasan d531babe82 Staging: hv: util: Deal with driver register failures
Properly deal with vmbus_driver_register() failures.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:53:50 -07:00
Dan Carpenter 7f9615e6f6 Staging: hv: netvsc: return negative error codes
There was a typo here and we changed the -ENOMEM into +ENOMEM.  The
error codes aren't used, so this is just a cleanup.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:15:23 -07:00
K. Y. Srinivasan bb5da491ff Staging: hv: mousevsc: Fix checkpatch errors and warnings
Fix checkpatch errors and warnings.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:10:47 -07:00
K. Y. Srinivasan d9add43b48 Staging: hv: vmbus: Fix checkpatch warnings in connection.c
Fix checkpatch warnings in connection.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:10:02 -07:00
K. Y. Srinivasan b737b2e00d Staging: hv: vmbus: Fix a checkpatch warning in ring_buffer.c
Fix a checkpatch warning in ring_buffer.c

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:10:02 -07:00
K. Y. Srinivasan c2ec81cb3e Staging: hv: vmbus: Get rid of an unnecessary check in vmbus_connect()
Get rid of an unnecessary check in vmbus_connect().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:10:01 -07:00
K. Y. Srinivasan 0bce28b62e Staging: hv: vmbus: Get rid of some dated/redundant comments
Get rid of some dated/redundant comments in vmbus_drv.c

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:07:00 -07:00
K. Y. Srinivasan 0a4425b65d Staging: hv: vmbus: Fixup indentation in vmbus_acpi_add()
Fixup indentation in vmbus_acpi_add().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:06:59 -07:00
K. Y. Srinivasan 93511baa06 Staging: hv: vmbus: Do not enable auto eoi
Linux interrupt handling code generates the eoi; don't enable auto eoi.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:06:59 -07:00
K. Y. Srinivasan ae4636e6c0 Staging: hv: vmbus: Get rid of vmbus_on_isr() by inlining the code
Get rid of vmbus_on_isr() by inlining the code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:05:31 -07:00
K. Y. Srinivasan e61ee14f0e Staging: hv: Fix a bug in vmbus_match()
The recent checkin that add a private pointer to hv_vmbus_device_id
introduced this bug in vmbus_match; fix it.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:05:31 -07:00
K. Y. Srinivasan dad76bf73f Staging: hv: vmbus: Properly deal with de-registering channel callback
Ensure that we correctly handle racing invocations of the channel callback
when the channel is being closed. We do this using the channel's inbound_lock.
A side-effect of this strategy is that we avoid repeatedly picking up this lock
as we drain the inbound ring-buffer.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:05:30 -07:00
K. Y. Srinivasan 76c39d429d Staging: hv: vmbus: Check before invoking the channel callback
When we close a channel, we set the corresponding callback function to NULL.
Check before invoking the channel callback.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:05:30 -07:00
K. Y. Srinivasan 95ff7cde91 Staging: hv: util: Adjust guest time in a process context
The current code was adjusting guest time in interrupt context; do this
in process context since we may have to initiate cross-processor
interrupts as part of setting time.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:05:30 -07:00
K. Y. Srinivasan ae2a0b42bf Staging: hv: util: Forcefully shutdown when shutdown is requested
When the host requests a "shutdown", make sure we shutdown!

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:05:29 -07:00
K. Y. Srinivasan 70691ec666 Staging: hv: storvsc: No need to copy from bounce buffer in case of a failure
No need to copy from bounce buffer in case of a failure; cleanup the code
accordingly.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:09 -07:00
K. Y. Srinivasan 2544b79437 Staging: hv: storvsc: In case of scsi errors offline the device
When we do get fatal errors from the host, offline the device since the
host has already tried all possible recovery actions.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:09 -07:00
K. Y. Srinivasan b8de73df1b Staging: hv: storvsc: Fix a typo
Fix a typo in a function name.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:09 -07:00
K. Y. Srinivasan 4ed51a21c0 Staging: hv: storvsc: Fixup srb and scsi status for INQUIRY and MODE_SENSE
The current VHD handler on the Windows Host does not correctly handle
INQUIRY and MODE_SENSE commands with some options. Fixup srb_status
in these cases since the failure is not fatal.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:08 -07:00
K. Y. Srinivasan c1b3d067e4 Staging: hv: storvsc: Cleanup storvsc_drv.c after adding the contents of hyperv_storage.h
Cleanup storvsc_drv.c after adding the contents of hyperv_storage.h.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:08 -07:00
K. Y. Srinivasan f0d79fe9c5 Staging: hv: storvsc: Add the contents of hyperv_storage.h to storvsc_drv.c
As part of further cleanup of storvsc, add the contents of hyperv_storage.h
to storvsc_drv.c and do the necessary adjustments.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:08 -07:00
K. Y. Srinivasan a1be1706ed Staging: hv: storvsc: Cleanup storvsc_drv.c after adding the contents of storvsc.c
Cleanup storvsc_drv.c after adding the contents of storvsc.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:07 -07:00
K. Y. Srinivasan 8dcf37d446 Staging: hv: storvsc: Include storvsc.c in storvsc_drv.c
As part of further cleanup of our storage drivers, include the content
of storvsc.c into storvsc_drv.c and delete storvsc.c and do the necessary
adjustments.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:07 -07:00
K. Y. Srinivasan fa23b8c78f Staging: hv: storvsc: Optimize the bounce buffer handling in the "read" case
Optimize the bounce buffer handling in the "read" case.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:07 -07:00
K. Y. Srinivasan 3612ef99b0 Staging: hv: storvsc: Optimize bounce buffer handling for the "write" case
Optimize bounce buffer handling for the "write" case.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:06 -07:00
K. Y. Srinivasan b38cc43432 Staging: hv: blkvsc: Get rid of blkvsc_drv.c as this code is not used
Now that blkvsc driver is no longer needed, remove blkvsc_drv.c

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:06 -07:00
K. Y. Srinivasan 21e3774236 Staging: hv: storvsc: Handle IDE devices using the storvsc driver
Now, enable handling of all IDE devices by extending the storvsc
device id table to handle IDE guid. As part of this cleanup Kconfig
and Hyper-V Makefile to not build the IDE driver (blkvsc).

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:06 -07:00
K. Y. Srinivasan bd1f5d6a00 Staging: hv: storvsc: Add code to handle IDE devices using the storvsc driver
Add code to handle IDE devices using the storvsc driver. The storvsc_probe()
is modified so that the storvsc driver can surface all disks presented to the
guest as scsi devices using generic upper level Linux scsi drivers.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:06 -07:00
K. Y. Srinivasan 9d88f33a15 Staging: hv: netvsc: Get rid of the refcnt field in struct netvsc_device
Get rid of the refcnt field in struct netvsc_device. We implement the following
logic to manage the life cycle of the device: If the device is being destroyed,
we do not allow any outgoing traffic. Furthermore, if the device is being
destroyed, we allow incoming traffic only to drain outgoing traffic. Note that
the driver may send some book keeping messages to the host not known to
upper level Linux code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:05 -07:00
K. Y. Srinivasan 124f506dc1 Staging: hv: netvsc: Get rid of release_inbound_net_device() by inlining the code
Get rid of release_inbound_net_device() by inlining the code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:05 -07:00
K. Y. Srinivasan 3852409b88 Staging: hv: netvsc: Get rid of release_outbound_net_device() by inlining the code
Get rid of release_outbound_net_device() by inlining the code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:05 -07:00
K. Y. Srinivasan 2ef7714397 Staging: hv: netvsc: Prevent outgoing traffic when netvsc dev is destroyed
Prevent outgoing traffic when netvsc dev is destroyed.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:05 -07:00
K. Y. Srinivasan c38b9c7118 Staging: hv: netvsc: Introduce state to manage the lifecycle of net device
Introduce state to manage the lifecycle of net device.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:04 -07:00
K. Y. Srinivasan 509ee3878b Staging: hv: netvsc: Cleanup alloc_net_device()
Cleanup alloc_net_device(); we can directly set the refcnt.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:04 -07:00
K. Y. Srinivasan 356c465719 Staging: hv: netvsc: Inline the code for free_net_device()
Inline the code for free_net_device().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:04 -07:00
K. Y. Srinivasan 5e6f4d069f Staging: hv: storvsc: Get rid of the reference counting in struct storvsc_device
Get rid of the reference counting in struct storvsc_device. We manage the lifecycle with
the following logic: If the device is marked for destruction, we dot allow any
outgoing traffic on the device. Incoming traffic is allowed only to drain pending
outgoing traffic. Note that while the upper level code in Linux deals with outstanding
I/Os, we may have situations on Hyper-V where some book keeping messages are sent out
that the upper level Linux code may not be aware of.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:04 -07:00
K. Y. Srinivasan a5b2359b05 Staging: hv: storvsc: Get rid of final_release_stor_device() by inlining code
Get rid of final_release_stor_device() by inlining code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:03 -07:00
K. Y. Srinivasan c352ee8f61 Staging: hv: storvsc: Get rid of release_stor_device() by inlining the code
Get rid of release_stor_device() by inlining the code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:03 -07:00
K. Y. Srinivasan 582f445fde Staging: hv: storvsc: Prevent outgoing traffic when stor dev is being destroyed
Prevent outgoing traffic when stor dev is destroyed.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:03 -07:00
K. Y. Srinivasan f6c17484eb Staging: hv: storvsc: Introduce state to manage the lifecycle of stor device
Introduce state to manage the lifecycle of stor device. This would be the
basis for managing the references on the stor object.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:02 -07:00
K. Y. Srinivasan df977d6c90 Staging: hv: storvsc: Cleanup alloc_stor_device()
Cleanup alloc_stor_device(), we can set the ref_count directly.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:02 -07:00
K. Y. Srinivasan 1eaaddf938 Staging: hv: storvsc: Rename get_stor_device()
In preparation for cleaning up how we manage reference counts on the stor
device, clearly distinguish why we are attempting to acquire a reference.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:02 -07:00
K. Y. Srinivasan bf49e80998 Staging: hv: storvsc: Rename must_get_stor_device()
In preparation for cleaning up how we manage reference counts on the stor
device, clearly distinguish why we are attempting to acquire a reference.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:02 -07:00
K. Y. Srinivasan bdbc49706b Staging: hv: storvsc: Do not aquire an unnecessary reference on stor_device
On entry into storvsc_on_io_completion() we have already acquired a reference
on the stor_device; there is no need to acquire an additional reference here.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:01 -07:00
K. Y. Srinivasan 0fb07a87ec Staging: hv: storvsc: Inline free_stor_device()
Inline the code for  free_stor_device() and get rid of the function.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:01:01 -07:00
Greg Kroah-Hartman 6a180978ae Staging: hv: hv_mouse: fix up remove() function
This function obviously never worked, it was a cut-and-paste from the
probe() function.  Rewrite it to do what it is supposed to do at least
in theory.  As to if it works yet, well, it's not worse than it was
before, so this can't hurt.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 16:51:28 -07:00
Greg Kroah-Hartman 4ab0871ddd Staging: hv: hv_mouse: remove a forward declaration
This moves some functions around to remove a forward declaration.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 16:47:43 -07:00
Greg Kroah-Hartman 3f4636e625 Staging: hv: hv_mouse: remove inputreport_callback function
It's not needed, so just inline the two lines.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 16:41:06 -07:00
Greg Kroah-Hartman 4bc694057b Staging: hv: hv_mouse: remove deviceinfo_callback function
It's not needed, so just inline the two lines.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 16:36:52 -07:00
K. Y. Srinivasan 18d08aff87 Staging: hv: mouse: Get rid of the unused PCI signature
Get rid of  the unused  PCI signature in the mouse driver.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:33:47 -07:00
K. Y. Srinivasan 5585d81e0a Staging: hv: netvsc: Change the jump label Exit to exit
Change the jump lable "Exit" to "exit".

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:25 -07:00
K. Y. Srinivasan 1c627870f0 Staging: hv: netvsc: Change the jump label Cleanup to cleanup
Change the jump label "Cleanup" to "cleanup".

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:25 -07:00
K. Y. Srinivasan fdb3c32cb7 Staging: hv: mouse: Change the jump label Cleanup to cleanup
Change the jump label "Cleanup" to "cleanup".

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:13 -07:00
K. Y. Srinivasan 327efbae1f Staging: hv: netvsc: Cleanup error code in rndis_filter_device_add()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:12 -07:00
K. Y. Srinivasan bc49b92671 Staging: hv: netvsc: Cleanup error returns in rndis_filter_init_device()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:12 -07:00
K. Y. Srinivasan 58ef3977ce Staging: hv: netvsc: Cleanup error return values in rndis_filter_set_packet_filter()
Use standard Linux error codes and cleanup some error paths.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:12 -07:00
K. Y. Srinivasan de6e0580d5 Staging: hv: netvsc: Cleanup error code in rndis_filter_query_device()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:12 -07:00
K. Y. Srinivasan 62c0743ef0 Staging: hv: netvsc: Cleanup error codes in rndis_filter_receive()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:11 -07:00
K. Y. Srinivasan ace163a85a Staging: hv: netvsc: Cleanup error return codes in netvsc_device_add()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:11 -07:00
K. Y. Srinivasan ff2bd69ae3 Staging: hv: netvsc: Cleanup error return values in netvsc_send()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:11 -07:00
K. Y. Srinivasan 0f48c72ca6 Staging: hv: netvsc: Cleanup error returns in netvsc_connect_vsp()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:11 -07:00
K. Y. Srinivasan 927bc33c0a Staging: hv: netvsc: Cleanup error return values in netvsc_init_recv_buf()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:10 -07:00
K. Y. Srinivasan a3e0053046 Staging: hv: netvsc: Cleanup error return codes in netvsc_destroy_recv_buf()
Cleanup error return codes in netvsc_destroy_recv_buf().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:10 -07:00
K. Y. Srinivasan 51a805d0ce Staging: hv: netvsc: Cleanup the returned error code in netvsc_probe()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:32:10 -07:00
K. Y. Srinivasan b06efc199f Staging: hv: storvsc: Cleanup returned error code in storvsc_drv_init()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:31:33 -07:00
K. Y. Srinivasan 8e854680b5 Staging: hv: storvsc: Cleanup error code returned in storvsc_probe()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:29:57 -07:00
K. Y. Srinivasan f3b741658c Staging: hv: storvsc: Cleanup returned error code in storvsc_host_reset()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:29:57 -07:00
K. Y. Srinivasan 1920da8801 Staging: hv: storvsc: Fix/cleanup some dated comments in storvsc.c
Fix/cleanup some dated comments in storvsc.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:29:57 -07:00
K. Y. Srinivasan e9bda4348b Storage: hv: storvsc: Get rid of some unnecessary DPRINTs from storvsc.c
Get rid of some unnecessary DPRINTs from storvsc.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:29:56 -07:00
K. Y. Srinivasan 3b54eed7de Staging: hv: storvsc: Cleanup error handling in storvsc_do_io()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:29:56 -07:00
K. Y. Srinivasan cae50a27a0 Staging: hv: storvsc: Cleanup error handling in storvsc_connect_to_vsp()
Cleanup error handling in storvsc_connect_to_vsp().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:29:56 -07:00
K. Y. Srinivasan 5260e291ff Staging: hv: storvsc: Cleanup error handling in storvsc_channel_init()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:29:55 -07:00
K. Y. Srinivasan d225d36b13 Staging: hv: storvsc: Cleanup error handling in storvsc_dev_add()
Use standard Linux error values and cleanup error handling. I would like
to acknowledge Andre Bartke (andre.bartke@gmail.com) for highlighting this
problem.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:29:55 -07:00
K. Y. Srinivasan 5289d3d160 Staging: hv: vmbus: Retry vmbus_post_msg() before giving up
The function hv_post_msg() can fail because of transient resource
conditions. It may be useful to retry the operation.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:23:19 -07:00
K. Y. Srinivasan 0293e5cabc Staging: hv: netvsc: Get rid of an unnecessary print statement in netvsc_probe()
Get rid of an unnecessary print statement in netvsc_probe(). Furthermore,
this fixes a bug since netdev_err is being invoked after the device has
been freed.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:23:19 -07:00
K. Y. Srinivasan 3d5cad97c4 Staging: hv: vmbus: Cleanup the error return value in vmbus_recvpacket_raw()
Use standard Linux errno values.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:23:18 -07:00
K. Y. Srinivasan d2598f017f Staging: hv: vmbus: Cleanup error values in ringbuffer.c
Use standard Linux errno values in ringbuffer.c and do the associated
cleanup in the clients.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:23:18 -07:00
K. Y. Srinivasan 176fb9e3f1 Staging: hv: vmbus: Change the variable name openInfo to open_info in channel.c
Change the variable name openInfo to open_info in channel.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:23:18 -07:00
K. Y. Srinivasan c8a56985fa Staging: hv: vmbus: Get rid of unnecessary comments in channel.c
Get rid of unnecessary comments in channel.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:23:17 -07:00
K. Y. Srinivasan 0987ff696d Staging: hv: vmbus: Rename openMsg to open_msg in channel.c
Rename openMsg to open_msg in channel.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:23:17 -07:00
K. Y. Srinivasan da06da287d Staging: hv: vmbus: Get rid of the function dump_gpadl_header()
Get rid of the function dump_gpadl_header() as this adds no value.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:22:19 -07:00
K. Y. Srinivasan 1f22b9aae3 Staging: hv: vmbus: Get rid of the function dump_gpadl_body()
Get rid of the function dump_gpadl_body() since it adds no value and actually is
in the data path.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:22:19 -07:00
K. Y. Srinivasan 7a9462d842 Staging: hv: vmbus: Get rid of unnecessay comments in connection.c
Get rid of unnecessay comments in connection.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:22:19 -07:00
K. Y. Srinivasan 5433e00334 Staging: hv: vmbus: Cleanup error handling in hv_init()
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:22:19 -07:00
K. Y. Srinivasan ffca7c40b6 Staging: hv: vmbus: Cleanup unnecessary comments in hv.c
Cleanup unnecessary comments in hv.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:22:18 -07:00
K. Y. Srinivasan 94a66c9c80 Staging: hv: vmbus: Get rid of some unnecessary comments
Get rid of some unnecessary comments.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:22:18 -07:00
Greg Kroah-Hartman 768fa21919 Staging: hv: fix up driver registering mess
Individual drivers should never be touching the 'struct device' field,
so if that is a requirement to pass to the vmbus core, you know
something is wrong.

This patch fixes that all up, and resolves the problem where the module
reference counting was not happening properly for the individual drivers
as well.  Overall, it reduces the lines of code the individual drivers
have to have, which tells you that this is the correct thing to do.

Also, somehow the _GPL marking for the functions got removed on an older
patch.  As the name of the function was changing, properly change the
_GPL marking as well at the same time.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:07:32 -07:00
K. Y. Srinivasan c411a5981d Staging: hv: util: Get rid of the PCI signature in hv_util.c
Now that we have implemented a vmbus specific mechanism for auto-loading,
get rid of the PCI signature.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 14:18:46 -07:00
K. Y. Srinivasan 84385b057f Staging: hv: util: Get rid of the DMI signature in hv_util.c
Now that we have implemented a vmbus specific mechanism for auto-loading,
get rid of the DMI signature.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 14:18:46 -07:00
K. Y. Srinivasan 2e7a35adbb Staging: hv: netvsc: Get rid of the DMI signature in netvsc_drv.c
Now that we have implemented a vmbus specific mechanism for auto-loading,
get rid of the DMI signature.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 14:18:45 -07:00
K. Y. Srinivasan d7dc6b9c2e Staging: hv: netvsc: Get rid of the PCI signature
Now that we have implemented a vmbus specific mechanism for auto-loading,
get rid of the PCI signature.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 14:18:36 -07:00
K. Y. Srinivasan 4e80fbfc7f Staging: hv: storvsc: Get rid of the DMI signature
Now that we have implemented a vmbus specific mechanism for auto-loading,
get rid of the DMI signature.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 14:16:02 -07:00
K. Y. Srinivasan 49ce6757cf Staging: hv: vmbus: Get rid of an unnecessary include line in vmbus_drv.c
Get rid of an unnecessary include line in vmbus_drv.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 14:11:17 -07:00
K. Y. Srinivasan 5841a82959 Staging: hv: vmbus: Support the notion of id tables in vmbus_match()
Introduce code to handle driver specific id tables to the vmbus core
(vmbus_match). This would allow us to handle more than one device type
with a given driver.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 14:11:16 -07:00
K. Y. Srinivasan 0ddda6603a Staging: hv: vmbus: Cleanup vmbus_uevent() code
Now generate appropriate uevent based on the modalias string. As part of this,
cleanup the existing uevent code.

[gregkh - fixed code to handle driver_data portion of struct
hv_vmbus_device_id]

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 14:08:23 -07:00
K. Y. Srinivasan 5cee7cb79d Staging: hv: vmbus: Cleanup vmbus_match()
Use the preferred mechanism to compare guids in vmbus_match().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 13:54:17 -07:00
Greg Kroah-Hartman c45cf2d497 Staging: hv: create VMBUS_DEVICE macro and use it.
This is to be used to be able to write hv_vmbus_device_id tables easier.

This patch also converts all hv drivers to use the macro, saving some
lines of code and making things easier to read overall.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 11:41:33 -07:00
K. Y. Srinivasan 283f21294e Staging: hv: util: Make hv_utils a vmbus device driver
In preperation for supporting auto-loading the util driver, make
the util driver a vmbus driver.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 11:31:11 -07:00
K. Y. Srinivasan 1ec91ebe4d Staging: hv: mousevsc: Use the newly introduced vmbus ID in mouse driver
Use the newly introduced vmbus ID in mouse driver. Also, do the associated
cleanup. Since the mouse driver is not functional, we disable the
autoloading of this driver.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 11:31:10 -07:00
K. Y. Srinivasan 345c4cc3b9 Staging: hv: netvsc: Use the newly introduced vmbus ID in netvsc driver
Use the newly introduced vmbus ID in netvsc driver. Also, do the associated
cleanup.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 11:31:10 -07:00
K. Y. Srinivasan d847b5fe33 Staging: hv: storvsc: Use the newly introduced vmbus ID in storvsc driver
Use the newly introduced vmbus ID in storvsc driver. Also, do the
assciated cleanup.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 11:31:10 -07:00
K. Y. Srinivasan eefd7f4555 Staging: hv: blkvsc: Use the newly introduced vmbus ID in the blockvsc driver
Use the newly introduced vmbus ID in the blockvsc driver. Also, do
the associated cleanup.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 11:31:09 -07:00
K. Y. Srinivasan 2e2c1d17ab Staging: hv: vmbus: Introduce vmbus ID space in struct hv_driver
In preparation for supporting auto-loading Hyper-V drivers
using vmbus specific aliases, introduce vmbus ID space in struct hv_driver.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 10:46:12 -07:00
K. Y. Srinivasan 358d2ee2e8 Staging: hv: Replace struct hv_guid with the uuid type already defined in Linux
Replace struct hv_guid with the uuid type already defined in Linux.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 10:23:06 -07:00
K. Y. Srinivasan 32a753ffb2 Staging: hv: vmbus: VMBUS is an ACPI enumerated device, get rid of the PCI signature
VMBUS is an ACPI enumerated device, get rid of the PCI signature.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 10:23:06 -07:00
Ruslan Pisarev dbbb24947e Staging: hv: Fix macros, tab errors and warning in drivers/staging/hv/hv_mouse.c
This is a patch to the hv_mouse.c file that fixed up macros, tab
errors and warning found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 16:21:11 -07:00
K. Y. Srinivasan 5be528c213 Staging: hv: util: kvp: Cleanup kvp_get_domain_name()
Cleanup kvp_get_domain_name(). If getaddrinfo() fails, deal with it properly
(this can happen if no IP address has been assigned). Also, don't specify
a specific service in the call to getaddrinfo() to make this code as generic
as possible. Lastly, move the call to gethostname() after the local variables.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 16:19:37 -07:00
K. Y. Srinivasan e54bbc6471 Staging: hv: util: kvp: Fix the reported OSVersion string
The current win7 host does not like it when we return the
complete kernel release information. Conform to what the host
expects.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 16:19:36 -07:00
K. Y. Srinivasan dec317fd6a Staging: hv: vmbus: Fix checkpatch warnings
Fix  checkpatch warnings in hv.c

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 16:17:13 -07:00
K. Y. Srinivasan 064931d0bb Staging: hv: tools: Fix a checkpatch warning in hv_kvp_daemon.c
Fix a checkpatch warning in hv_kvp_daemon.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 16:16:11 -07:00
K. Y. Srinivasan 2dda95f80b Staging: hv: vmbus: Don't wait indefinitely for IRQ resouces
If an attempt is made to load the vmbus driver on a non-Hyper-V platform,
the load operation will hang since we currently wait indefinitely to
retrieve the IRQ information. This is done in the context of an acpi callback
context (which will obviously not happen when this driver is
loaded on a non-Hyper-V platform). This patch fixes the problem.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 16:16:11 -07:00
David S. Miller 823dcd2506 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net 2011-08-20 10:39:12 -07:00
Jiri Pirko afc4b13df1 net: remove use of ndo_set_multicast_list in drivers
replace it by ndo_set_rx_mode

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-17 20:22:03 -07:00
Julia Lawall fe3e593601 drivers/staging/hv/blkvsc_drv.c: eliminate NULL pointer dereference
In this code, blkvsc_req is allocated in the cache blkdev->request_pool,
but freed in the first case to the cache blkvsc_req->dev->request_pool.
blkvsc_req->dev is subsequently initialized to blkdev, making these the
same at the second call to kmem_cache_free.  But at the point of the first
call, blkvsc_req->dev is NULL.  The second call is changed too, for
uniformity.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,e,e1,e2,e3;
@@

x = \(kmem_cache_alloc\|kmem_cache_zalloc\)(e1,e2)
... when != x = e
(
kmem_cache_free(e1,x);
|
?-kmem_cache_free(e3,x);
+kmem_cache_free(e1,x);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: KY Srinivasan <kys@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-02 16:12:49 -07:00
Linus Torvalds 1380516599 Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (741 commits)
  staging:iio:meter:ade7753 should be 16 bit read not 8 bit for mode register.
  staging:iio:kfifo_buf fix double initialization of the ring device structure.
  staging:iio:accel:lis3l02dq: fix incorrect pointer passed to spi_set_drvdata.
  staging:iio:imu fix missing register table index for some channels
  spectra: enable device before poking it
  staging: rts_pstor: Fix a miswriting
  staging/lirc_bt829: Return -ENODEV when no hardware is found.
  staging/lirc_parallel: remove pointless prototypes.
  staging/lirc_parallel: fix panic on rmmod
  staging:iio:adc:ad7476: Incorrect pointer into spi_set_drvdata.
  Staging: zram: Fix kunmapping order
  Revert "gma500: Fix dependencies"
  gma500: Add medfield header
  gma500: wire up the mrst i2c bus from chip_info
  gma500: Fix DPU build
  gma500: Clean up the DPU config and make it runtime
  gma500: resync with Medfield progress
  gma500: Use the mrst helpers and power control for mode commit
  gma500@ Fix backlight range error
  gma500: More Moorestown muddle meddling means MM maybe might modeset
  ...

Fix up fairly trivial conflicts all over, mostly due to header file
cleanup conflicts, but some deleted files and some just context changes:
 - Documentation/feature-removal-schedule.txt
 - drivers/staging/bcm/headers.h
 - drivers/staging/brcm80211/brcmfmac/dhd_linux.c
 - drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
 - drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
 - drivers/staging/brcm80211/brcmfmac/wl_iw.c
 - drivers/staging/et131x/et131x_netdev.c
 - drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
 - drivers/staging/rtl8192e/r8192E.h
 - drivers/staging/usbip/userspace/src/utils.h
2011-07-25 23:26:34 -07:00
Haiyang Zhang e4d59ac5c6 staging: hv: fix some white spaces in netvsc driver
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 09:10:47 -07:00
Jesper Juhl e56269a62f Remove unneeded version.h include from drivers/staging/hv/hv_timesource.c
It was pointed out by 'make versioncheck' that include of
linux/version.h is not needed in drivers/staging/hv/hv_timesource.c .
This patch removes it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 09:10:47 -07:00
K. Y. Srinivasan 91fd799eb1 Staging: hv: vmbus: Properly handle the error in hv_acpi_init()
Properly handle the error in hv_acpi_init().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 08:59:24 -07:00
K. Y. Srinivasan 9079ce6912 Staging: hv: netvsc: Fix a bug in accounting transmit slots
The transmit slots were manipulated without proper locking. Fix this bug by
making the variable tracking the transmit slots atomic.

This patch should be ported to prior stable kernels 2.6.32 and later.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 08:59:24 -07:00
K. Y. Srinivasan 46d2eb6d82 Staging: hv: storvsc: Increase the timeout value in the storvsc driver
On some loaded windows hosts, we have discovered that the host may not
respond to guest requests within the specified time (one second)
as evidenced by the guest timing out. Fix this problem by increasing
the timeout to 5 seconds.

It may be useful to apply this patch to the 3.0 kernel as well.
the 3.0 kernel as well.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 08:59:24 -07:00
K. Y. Srinivasan 5c5781b3f8 Staging: hv: netvsc: Increase the timeout value in the netvsc driver
On some loaded windows hosts, we have discovered that the host may not
respond to guest requests within the specified time (one second)
as evidenced by the guest timing out. Fix this problem by increasing
the timeout to 5 seconds.

It may be useful to apply this patch to the 3.0 kernel as well.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 08:59:23 -07:00
K. Y. Srinivasan 2dfde9644f Staging: hv: vmbus: Increase the timeout value in the vmbus driver
On some loaded windows hosts, we have discovered that the host may not
respond to guest requests within the specified time (one second)
as evidenced by the guest timing out. Fix this problem by increasing
the timeout to 5 seconds.

It may be useful to apply this patch to the 3.0 kernel as well.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 08:59:23 -07:00
Vitaliy Ivanov e44ba033c5 treewide: remove duplicate includes
Many stupid corrections of duplicated includes based on the output of
scripts/checkincludes.pl.

Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-20 16:08:19 +02:00
K. Y. Srinivasan 00d760b057 Staging: hv: vmbus: Change Cleanup to cleanup in channel.c
Change the jump label Cleanup to cleanup.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:08 -07:00
K. Y. Srinivasan 926ae52621 Staging: hv: vmbus: Cleanup some error values in channel.c
Cleanup some error values in channel.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:07 -07:00
K. Y. Srinivasan 3a7546d934 Staging: hv: vmbus: Cleanup error codes in connection.c
Cleanup error codes in connection.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:06 -07:00
K. Y. Srinivasan 39594abcd4 Staging: hv: vmbus: Cleanup error codes in hv.c
Cleanup error codes in hv.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:06 -07:00
K. Y. Srinivasan d6c1c5de4e Staging: hv: vmbus: Cleanup error handling in vmbus_bus_init()
Cleanup error handling in vmbus_bus_init().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:05 -07:00
K. Y. Srinivasan 6de925b189 Staging: hv: vmbus: Cleanup some error codes in vmbus_drv.c
Cleanup some error codes in vmbus_drv.c

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:04 -07:00
K. Y. Srinivasan f38cf9ccd6 Staging: hv: vmbus: Properly handle memory allocation failure in channel.c
Properly handle memory allocation failure in channel.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:04 -07:00
K. Y. Srinivasan 40961de335 Staging: hv: vmbus: Increase the timeout for some critical calls
Increase the timeout for some critical calls. In testing we discovered that the
current timeout of 1 second was insufficient under some conditions.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:03 -07:00
K. Y. Srinivasan e8e2704774 Staging: hv: vmbus: Rename local variables in vmbus_drv.c
Rename local variables in vmbus_drv.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:03 -07:00
K. Y. Srinivasan e826f1d505 Staging: hv: vmbus: Fix a memory barrier call in vmbus_drv.c
Use the correct memory barrier call in vmbus_drv.c

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:02 -07:00
K. Y. Srinivasan 3740652d98 Staging: hv: vmbus: Get rid of a dated comment in channel_mgmt.c
Staging: hv: vmbus: Get rid of a dated comment in channel_mgmt.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:01 -07:00
K. Y. Srinivasan c0e2490fd4 Staging: hv: vmbus: Get rid of an unused function in connection.c
Get rid of an unused function in connection.c

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:01 -07:00
K. Y. Srinivasan db545da77b Staging: hv: vmbus: Get rid of a dated comment in vmbus_drv.c
Get rid of a dated comment in vmbus_drv.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:00 -07:00
K. Y. Srinivasan e9a27a9f9e Staging: hv: vmbus: Use the newly introduced state in closing the channel
Now, use the newly introduced state in closing the channel and eliminate a
potential failure condition (that currently was not being handled correctly).

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:46:00 -07:00
K. Y. Srinivasan f9f1db832b Staging: hv: vmbus: Embed the state needed to close the channel
Now, embed the state needed to close the channel - so we would not have to
allocate memory in the channel close path.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:45:59 -07:00
K. Y. Srinivasan 7d7c75cd47 Staging: hv: vmbus: Move the definition of struct vmbus_channel
In preparation for embedding the state needed to close the channel, move
the definition of struct vmbus_channel.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:45:59 -07:00