2009-07-13 23:02:34 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2009, Microsoft Corporation.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms and conditions of the GNU General Public License,
|
|
|
|
* version 2, as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with
|
|
|
|
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
|
|
|
* Place - Suite 330, Boston, MA 02111-1307 USA.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Haiyang Zhang <haiyangz@microsoft.com>
|
|
|
|
* Hank Janssen <hjanssen@microsoft.com>
|
|
|
|
*/
|
2009-08-18 00:22:08 +00:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/mm.h>
|
2009-08-19 23:14:47 +00:00
|
|
|
#include "osd.h"
|
2009-08-28 23:22:59 +00:00
|
|
|
#include "logging.h"
|
2009-07-13 23:02:34 +00:00
|
|
|
#include "VmbusPrivate.h"
|
|
|
|
|
2009-08-28 23:26:11 +00:00
|
|
|
struct vmbus_channel_message_table_entry {
|
2009-09-01 04:51:50 +00:00
|
|
|
enum vmbus_channel_message_type messageType;
|
|
|
|
void (*messageHandler)(struct vmbus_channel_message_header *msg);
|
2009-08-28 23:26:11 +00:00
|
|
|
};
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
#define MAX_NUM_DEVICE_CLASSES_SUPPORTED 4
|
2009-09-01 04:47:21 +00:00
|
|
|
static const struct hv_guid
|
|
|
|
gSupportedDeviceClasses[MAX_NUM_DEVICE_CLASSES_SUPPORTED] = {
|
2009-07-27 20:47:24 +00:00
|
|
|
/* {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f} */
|
2009-08-19 23:17:03 +00:00
|
|
|
/* Storage - SCSI */
|
|
|
|
{
|
|
|
|
.data = {
|
|
|
|
0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d,
|
|
|
|
0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2009-07-27 20:47:24 +00:00
|
|
|
/* {F8615163-DF3E-46c5-913F-F2D2F965ED0E} */
|
2009-08-19 23:17:03 +00:00
|
|
|
/* Network */
|
|
|
|
{
|
|
|
|
.data = {
|
|
|
|
0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46,
|
|
|
|
0x91, 0x3F, 0xF2, 0xD2, 0xF9, 0x65, 0xED, 0x0E
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2009-07-27 20:47:24 +00:00
|
|
|
/* {CFA8B69E-5B4A-4cc0-B98B-8BA1A1F3F95A} */
|
2009-08-19 23:17:03 +00:00
|
|
|
/* Input */
|
|
|
|
{
|
|
|
|
.data = {
|
|
|
|
0x9E, 0xB6, 0xA8, 0xCF, 0x4A, 0x5B, 0xc0, 0x4c,
|
|
|
|
0xB9, 0x8B, 0x8B, 0xA1, 0xA1, 0xF3, 0xF9, 0x5A
|
|
|
|
}
|
|
|
|
},
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-08-19 23:17:03 +00:00
|
|
|
/* {32412632-86cb-44a2-9b5c-50d1417354f5} */
|
|
|
|
/* IDE */
|
|
|
|
{
|
|
|
|
.data = {
|
|
|
|
0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
|
|
|
|
0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5
|
|
|
|
}
|
|
|
|
},
|
2009-07-13 23:02:34 +00:00
|
|
|
};
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* AllocVmbusChannel - Allocate and initialize a vmbus channel object
|
|
|
|
*/
|
2009-08-18 22:21:19 +00:00
|
|
|
struct vmbus_channel *AllocVmbusChannel(void)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
2009-08-18 22:21:19 +00:00
|
|
|
struct vmbus_channel *channel;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-08-18 22:21:19 +00:00
|
|
|
channel = kzalloc(sizeof(*channel), GFP_ATOMIC);
|
2009-07-13 23:02:34 +00:00
|
|
|
if (!channel)
|
|
|
|
return NULL;
|
|
|
|
|
2009-07-15 21:48:32 +00:00
|
|
|
spin_lock_init(&channel->inbound_lock);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-07-29 22:40:57 +00:00
|
|
|
init_timer(&channel->poll_timer);
|
|
|
|
channel->poll_timer.data = (unsigned long)channel;
|
|
|
|
channel->poll_timer.function = VmbusChannelOnTimer;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-07-29 21:00:09 +00:00
|
|
|
channel->ControlWQ = create_workqueue("hv_vmbus_ctl");
|
2009-09-01 04:47:21 +00:00
|
|
|
if (!channel->ControlWQ) {
|
2009-07-15 19:48:29 +00:00
|
|
|
kfree(channel);
|
2009-07-13 23:02:34 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return channel;
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* ReleaseVmbusChannel - Release the vmbus channel object itself
|
|
|
|
*/
|
|
|
|
static inline void ReleaseVmbusChannel(void *context)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
2009-09-01 04:47:21 +00:00
|
|
|
struct vmbus_channel *channel = context;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_ENTER(VMBUS);
|
|
|
|
|
|
|
|
DPRINT_DBG(VMBUS, "releasing channel (%p)", channel);
|
2009-07-29 21:00:09 +00:00
|
|
|
destroy_workqueue(channel->ControlWQ);
|
2009-07-13 23:02:34 +00:00
|
|
|
DPRINT_DBG(VMBUS, "channel released (%p)", channel);
|
|
|
|
|
2009-07-15 19:48:29 +00:00
|
|
|
kfree(channel);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* FreeVmbusChannel - Release the resources used by the vmbus channel object
|
|
|
|
*/
|
2009-08-18 22:21:19 +00:00
|
|
|
void FreeVmbusChannel(struct vmbus_channel *Channel)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
2009-07-29 22:40:57 +00:00
|
|
|
del_timer(&Channel->poll_timer);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/*
|
|
|
|
* We have to release the channel's workqueue/thread in the vmbus's
|
|
|
|
* workqueue/thread context
|
|
|
|
* ie we can't destroy ourselves.
|
|
|
|
*/
|
2009-07-29 21:00:09 +00:00
|
|
|
osd_schedule_callback(gVmbusConnection.WorkQueue, ReleaseVmbusChannel,
|
2009-09-01 04:47:21 +00:00
|
|
|
Channel);
|
2009-07-13 23:02:34 +00:00
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* VmbusChannelProcessOffer - Process the offer by creating a channel/device associated with this offer
|
|
|
|
*/
|
|
|
|
static void VmbusChannelProcessOffer(void *context)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
2009-08-18 22:21:19 +00:00
|
|
|
struct vmbus_channel *newChannel = context;
|
|
|
|
struct vmbus_channel *channel;
|
2009-09-01 04:47:21 +00:00
|
|
|
LIST_ENTRY *anchor;
|
|
|
|
LIST_ENTRY *curr;
|
2009-07-15 19:46:44 +00:00
|
|
|
bool fNew = true;
|
2009-09-01 04:47:21 +00:00
|
|
|
int ret;
|
2009-07-15 21:57:16 +00:00
|
|
|
unsigned long flags;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_ENTER(VMBUS);
|
|
|
|
|
2009-07-27 20:47:24 +00:00
|
|
|
/* Make sure this is a new offer */
|
2009-07-15 21:57:16 +00:00
|
|
|
spin_lock_irqsave(&gVmbusConnection.channel_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
ITERATE_LIST_ENTRIES(anchor, curr, &gVmbusConnection.ChannelList) {
|
|
|
|
channel = CONTAINING_RECORD(curr, struct vmbus_channel,
|
|
|
|
ListEntry);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
if (!memcmp(&channel->OfferMsg.Offer.InterfaceType,
|
|
|
|
&newChannel->OfferMsg.Offer.InterfaceType,
|
|
|
|
sizeof(struct hv_guid)) &&
|
|
|
|
!memcmp(&channel->OfferMsg.Offer.InterfaceInstance,
|
|
|
|
&newChannel->OfferMsg.Offer.InterfaceInstance,
|
|
|
|
sizeof(struct hv_guid))) {
|
2009-07-15 19:46:44 +00:00
|
|
|
fNew = false;
|
2009-07-13 23:02:34 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (fNew)
|
2009-09-01 04:47:21 +00:00
|
|
|
INSERT_TAIL_LIST(&gVmbusConnection.ChannelList,
|
|
|
|
&newChannel->ListEntry);
|
|
|
|
|
2009-07-15 21:57:16 +00:00
|
|
|
spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
if (!fNew) {
|
|
|
|
DPRINT_DBG(VMBUS, "Ignoring duplicate offer for relid (%d)",
|
|
|
|
newChannel->OfferMsg.ChildRelId);
|
2009-07-13 23:02:34 +00:00
|
|
|
FreeVmbusChannel(newChannel);
|
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/*
|
|
|
|
* Start the process of binding this offer to the driver
|
|
|
|
* We need to set the DeviceObject field before calling
|
|
|
|
* VmbusChildDeviceAdd()
|
|
|
|
*/
|
2009-07-13 23:02:34 +00:00
|
|
|
newChannel->DeviceObject = VmbusChildDeviceCreate(
|
2009-08-19 23:18:56 +00:00
|
|
|
&newChannel->OfferMsg.Offer.InterfaceType,
|
|
|
|
&newChannel->OfferMsg.Offer.InterfaceInstance,
|
2009-07-13 23:02:34 +00:00
|
|
|
newChannel);
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
DPRINT_DBG(VMBUS, "child device object allocated - %p",
|
|
|
|
newChannel->DeviceObject);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-07-27 20:47:24 +00:00
|
|
|
/*
|
|
|
|
* Add the new device to the bus. This will kick off device-driver
|
|
|
|
* binding which eventually invokes the device driver's AddDevice()
|
|
|
|
* method.
|
|
|
|
*/
|
2009-07-13 23:02:34 +00:00
|
|
|
ret = VmbusChildDeviceAdd(newChannel->DeviceObject);
|
2009-09-01 04:47:21 +00:00
|
|
|
if (ret != 0) {
|
|
|
|
DPRINT_ERR(VMBUS,
|
|
|
|
"unable to add child device object (relid %d)",
|
|
|
|
newChannel->OfferMsg.ChildRelId);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-07-15 21:57:16 +00:00
|
|
|
spin_lock_irqsave(&gVmbusConnection.channel_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
REMOVE_ENTRY_LIST(&newChannel->ListEntry);
|
2009-07-15 21:57:16 +00:00
|
|
|
spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
FreeVmbusChannel(newChannel);
|
2009-09-01 04:47:21 +00:00
|
|
|
} else {
|
2009-07-27 20:47:24 +00:00
|
|
|
/*
|
|
|
|
* This state is used to indicate a successful open
|
|
|
|
* so that when we do close the channel normally, we
|
|
|
|
* can cleanup properly
|
|
|
|
*/
|
2009-07-13 23:02:34 +00:00
|
|
|
newChannel->State = CHANNEL_OPEN_STATE;
|
|
|
|
}
|
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* VmbusChannelProcessRescindOffer - Rescind the offer by initiating a device removal
|
|
|
|
*/
|
|
|
|
static void VmbusChannelProcessRescindOffer(void *context)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
2009-08-18 22:21:19 +00:00
|
|
|
struct vmbus_channel *channel = context;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_ENTER(VMBUS);
|
|
|
|
VmbusChildDeviceRemove(channel->DeviceObject);
|
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* VmbusChannelOnOffer - Handler for channel offers from vmbus in parent partition.
|
|
|
|
*
|
|
|
|
* We ignore all offers except network and storage offers. For each network and
|
|
|
|
* storage offers, we create a channel object and queue a work item to the
|
|
|
|
* channel object to process the offer synchronously
|
|
|
|
*/
|
2009-08-26 22:16:04 +00:00
|
|
|
static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
2009-09-01 04:47:21 +00:00
|
|
|
struct vmbus_channel_offer_channel *offer;
|
2009-08-18 22:21:19 +00:00
|
|
|
struct vmbus_channel *newChannel;
|
2009-08-19 23:17:03 +00:00
|
|
|
struct hv_guid *guidType;
|
|
|
|
struct hv_guid *guidInstance;
|
2009-07-13 23:02:34 +00:00
|
|
|
int i;
|
2009-09-01 04:47:21 +00:00
|
|
|
int fSupported = 0;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_ENTER(VMBUS);
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
offer = (struct vmbus_channel_offer_channel *)hdr;
|
|
|
|
for (i = 0; i < MAX_NUM_DEVICE_CLASSES_SUPPORTED; i++) {
|
|
|
|
if (memcmp(&offer->Offer.InterfaceType,
|
|
|
|
&gSupportedDeviceClasses[i], sizeof(struct hv_guid)) == 0) {
|
2009-07-13 23:02:34 +00:00
|
|
|
fSupported = 1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
if (!fSupported) {
|
|
|
|
DPRINT_DBG(VMBUS, "Ignoring channel offer notification for "
|
|
|
|
"child relid %d", offer->ChildRelId);
|
2009-07-13 23:02:34 +00:00
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
guidType = &offer->Offer.InterfaceType;
|
|
|
|
guidInstance = &offer->Offer.InterfaceInstance;
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
DPRINT_INFO(VMBUS, "Channel offer notification - "
|
|
|
|
"child relid %d monitor id %d allocated %d, "
|
|
|
|
"type {%02x%02x%02x%02x-%02x%02x-%02x%02x-"
|
|
|
|
"%02x%02x%02x%02x%02x%02x%02x%02x} "
|
|
|
|
"instance {%02x%02x%02x%02x-%02x%02x-%02x%02x-"
|
|
|
|
"%02x%02x%02x%02x%02x%02x%02x%02x}",
|
|
|
|
offer->ChildRelId, offer->MonitorId,
|
|
|
|
offer->MonitorAllocated,
|
|
|
|
guidType->data[3], guidType->data[2],
|
|
|
|
guidType->data[1], guidType->data[0],
|
|
|
|
guidType->data[5], guidType->data[4],
|
|
|
|
guidType->data[7], guidType->data[6],
|
|
|
|
guidType->data[8], guidType->data[9],
|
|
|
|
guidType->data[10], guidType->data[11],
|
|
|
|
guidType->data[12], guidType->data[13],
|
|
|
|
guidType->data[14], guidType->data[15],
|
|
|
|
guidInstance->data[3], guidInstance->data[2],
|
|
|
|
guidInstance->data[1], guidInstance->data[0],
|
|
|
|
guidInstance->data[5], guidInstance->data[4],
|
|
|
|
guidInstance->data[7], guidInstance->data[6],
|
|
|
|
guidInstance->data[8], guidInstance->data[9],
|
|
|
|
guidInstance->data[10], guidInstance->data[11],
|
|
|
|
guidInstance->data[12], guidInstance->data[13],
|
|
|
|
guidInstance->data[14], guidInstance->data[15]);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-07-27 20:47:24 +00:00
|
|
|
/* Allocate the channel object and save this offer. */
|
2009-07-13 23:02:34 +00:00
|
|
|
newChannel = AllocVmbusChannel();
|
2009-09-01 04:47:21 +00:00
|
|
|
if (!newChannel) {
|
2009-07-13 23:02:34 +00:00
|
|
|
DPRINT_ERR(VMBUS, "unable to allocate channel object");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
DPRINT_DBG(VMBUS, "channel object allocated - %p", newChannel);
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
memcpy(&newChannel->OfferMsg, offer,
|
|
|
|
sizeof(struct vmbus_channel_offer_channel));
|
2009-07-14 22:08:20 +00:00
|
|
|
newChannel->MonitorGroup = (u8)offer->MonitorId / 32;
|
|
|
|
newChannel->MonitorBit = (u8)offer->MonitorId % 32;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-07-27 20:47:24 +00:00
|
|
|
/* TODO: Make sure the offer comes from our parent partition */
|
2009-07-29 21:00:09 +00:00
|
|
|
osd_schedule_callback(newChannel->ControlWQ, VmbusChannelProcessOffer,
|
|
|
|
newChannel);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* VmbusChannelOnOfferRescind - Rescind offer handler.
|
|
|
|
*
|
|
|
|
* We queue a work item to process this offer synchronously
|
|
|
|
*/
|
2009-08-26 22:16:04 +00:00
|
|
|
static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *hdr)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
2009-09-01 04:47:21 +00:00
|
|
|
struct vmbus_channel_rescind_offer *rescind;
|
2009-08-18 22:21:19 +00:00
|
|
|
struct vmbus_channel *channel;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_ENTER(VMBUS);
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
rescind = (struct vmbus_channel_rescind_offer *)hdr;
|
2009-07-13 23:02:34 +00:00
|
|
|
channel = GetChannelFromRelId(rescind->ChildRelId);
|
2009-09-01 04:47:21 +00:00
|
|
|
if (channel == NULL) {
|
|
|
|
DPRINT_DBG(VMBUS, "channel not found for relId %d",
|
|
|
|
rescind->ChildRelId);
|
2009-07-13 23:02:34 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2009-07-29 21:00:09 +00:00
|
|
|
osd_schedule_callback(channel->ControlWQ,
|
|
|
|
VmbusChannelProcessRescindOffer,
|
|
|
|
channel);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* VmbusChannelOnOffersDelivered - This is invoked when all offers have been delivered.
|
|
|
|
*
|
|
|
|
* Nothing to do here.
|
|
|
|
*/
|
|
|
|
static void VmbusChannelOnOffersDelivered(
|
|
|
|
struct vmbus_channel_message_header *hdr)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
|
|
|
DPRINT_ENTER(VMBUS);
|
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* VmbusChannelOnOpenResult - Open result handler.
|
|
|
|
*
|
|
|
|
* This is invoked when we received a response to our channel open request.
|
|
|
|
* Find the matching request, copy the response and signal the requesting
|
|
|
|
* thread.
|
|
|
|
*/
|
2009-08-26 22:16:04 +00:00
|
|
|
static void VmbusChannelOnOpenResult(struct vmbus_channel_message_header *hdr)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
2009-09-01 04:47:21 +00:00
|
|
|
struct vmbus_channel_open_result *result;
|
|
|
|
LIST_ENTRY *anchor;
|
|
|
|
LIST_ENTRY *curr;
|
2009-08-18 22:21:19 +00:00
|
|
|
struct vmbus_channel_msginfo *msgInfo;
|
2009-08-26 22:16:04 +00:00
|
|
|
struct vmbus_channel_message_header *requestHeader;
|
|
|
|
struct vmbus_channel_open_channel *openMsg;
|
2009-07-15 21:56:45 +00:00
|
|
|
unsigned long flags;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_ENTER(VMBUS);
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
result = (struct vmbus_channel_open_result *)hdr;
|
2009-07-13 23:02:34 +00:00
|
|
|
DPRINT_DBG(VMBUS, "vmbus open result - %d", result->Status);
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/*
|
|
|
|
* Find the open msg, copy the result and signal/unblock the wait event
|
|
|
|
*/
|
2009-07-15 21:56:45 +00:00
|
|
|
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
ITERATE_LIST_ENTRIES(anchor, curr, &gVmbusConnection.ChannelMsgList) {
|
2009-08-18 22:21:19 +00:00
|
|
|
msgInfo = (struct vmbus_channel_msginfo *)curr;
|
2009-08-26 22:16:04 +00:00
|
|
|
requestHeader = (struct vmbus_channel_message_header *)msgInfo->Msg;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
if (requestHeader->MessageType == ChannelMessageOpenChannel) {
|
2009-08-26 22:16:04 +00:00
|
|
|
openMsg = (struct vmbus_channel_open_channel *)msgInfo->Msg;
|
2009-07-13 23:02:34 +00:00
|
|
|
if (openMsg->ChildRelId == result->ChildRelId &&
|
2009-09-01 04:47:21 +00:00
|
|
|
openMsg->OpenId == result->OpenId) {
|
|
|
|
memcpy(&msgInfo->Response.OpenResult,
|
|
|
|
result,
|
|
|
|
sizeof(struct vmbus_channel_open_result));
|
2009-07-29 22:40:18 +00:00
|
|
|
osd_WaitEventSet(msgInfo->WaitEvent);
|
2009-07-13 23:02:34 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2009-07-15 21:56:45 +00:00
|
|
|
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* VmbusChannelOnGpadlCreated - GPADL created handler.
|
|
|
|
*
|
|
|
|
* This is invoked when we received a response to our gpadl create request.
|
|
|
|
* Find the matching request, copy the response and signal the requesting
|
|
|
|
* thread.
|
|
|
|
*/
|
2009-08-26 22:16:04 +00:00
|
|
|
static void VmbusChannelOnGpadlCreated(struct vmbus_channel_message_header *hdr)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
2009-09-01 04:47:21 +00:00
|
|
|
struct vmbus_channel_gpadl_created *gpadlCreated;
|
2009-07-13 23:02:34 +00:00
|
|
|
LIST_ENTRY *anchor;
|
|
|
|
LIST_ENTRY *curr;
|
2009-08-18 22:21:19 +00:00
|
|
|
struct vmbus_channel_msginfo *msgInfo;
|
2009-08-26 22:16:04 +00:00
|
|
|
struct vmbus_channel_message_header *requestHeader;
|
|
|
|
struct vmbus_channel_gpadl_header *gpadlHeader;
|
2009-07-15 21:56:45 +00:00
|
|
|
unsigned long flags;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_ENTER(VMBUS);
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
gpadlCreated = (struct vmbus_channel_gpadl_created *)hdr;
|
|
|
|
DPRINT_DBG(VMBUS, "vmbus gpadl created result - %d",
|
|
|
|
gpadlCreated->CreationStatus);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/*
|
|
|
|
* Find the establish msg, copy the result and signal/unblock the wait
|
|
|
|
* event
|
|
|
|
*/
|
2009-07-15 21:56:45 +00:00
|
|
|
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
ITERATE_LIST_ENTRIES(anchor, curr, &gVmbusConnection.ChannelMsgList) {
|
2009-08-18 22:21:19 +00:00
|
|
|
msgInfo = (struct vmbus_channel_msginfo *)curr;
|
2009-08-26 22:16:04 +00:00
|
|
|
requestHeader = (struct vmbus_channel_message_header *)msgInfo->Msg;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
if (requestHeader->MessageType == ChannelMessageGpadlHeader) {
|
2009-08-26 22:16:04 +00:00
|
|
|
gpadlHeader = (struct vmbus_channel_gpadl_header *)requestHeader;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
if ((gpadlCreated->ChildRelId ==
|
|
|
|
gpadlHeader->ChildRelId) &&
|
|
|
|
(gpadlCreated->Gpadl == gpadlHeader->Gpadl)) {
|
|
|
|
memcpy(&msgInfo->Response.GpadlCreated,
|
|
|
|
gpadlCreated,
|
|
|
|
sizeof(struct vmbus_channel_gpadl_created));
|
2009-07-29 22:40:18 +00:00
|
|
|
osd_WaitEventSet(msgInfo->WaitEvent);
|
2009-07-13 23:02:34 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2009-07-15 21:56:45 +00:00
|
|
|
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* VmbusChannelOnGpadlTorndown - GPADL torndown handler.
|
|
|
|
*
|
|
|
|
* This is invoked when we received a response to our gpadl teardown request.
|
|
|
|
* Find the matching request, copy the response and signal the requesting
|
|
|
|
* thread.
|
|
|
|
*/
|
|
|
|
static void VmbusChannelOnGpadlTorndown(
|
|
|
|
struct vmbus_channel_message_header *hdr)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
2009-09-01 04:47:21 +00:00
|
|
|
struct vmbus_channel_gpadl_torndown *gpadlTorndown;
|
|
|
|
LIST_ENTRY *anchor;
|
|
|
|
LIST_ENTRY *curr;
|
2009-08-18 22:21:19 +00:00
|
|
|
struct vmbus_channel_msginfo *msgInfo;
|
2009-08-26 22:16:04 +00:00
|
|
|
struct vmbus_channel_message_header *requestHeader;
|
|
|
|
struct vmbus_channel_gpadl_teardown *gpadlTeardown;
|
2009-07-15 21:56:45 +00:00
|
|
|
unsigned long flags;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_ENTER(VMBUS);
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
gpadlTorndown = (struct vmbus_channel_gpadl_torndown *)hdr;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Find the open msg, copy the result and signal/unblock the wait event
|
|
|
|
*/
|
2009-07-15 21:56:45 +00:00
|
|
|
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
ITERATE_LIST_ENTRIES(anchor, curr, &gVmbusConnection.ChannelMsgList) {
|
2009-08-18 22:21:19 +00:00
|
|
|
msgInfo = (struct vmbus_channel_msginfo *)curr;
|
2009-08-26 22:16:04 +00:00
|
|
|
requestHeader = (struct vmbus_channel_message_header *)msgInfo->Msg;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
if (requestHeader->MessageType == ChannelMessageGpadlTeardown) {
|
2009-08-26 22:16:04 +00:00
|
|
|
gpadlTeardown = (struct vmbus_channel_gpadl_teardown *)requestHeader;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
if (gpadlTorndown->Gpadl == gpadlTeardown->Gpadl) {
|
|
|
|
memcpy(&msgInfo->Response.GpadlTorndown,
|
|
|
|
gpadlTorndown,
|
|
|
|
sizeof(struct vmbus_channel_gpadl_torndown));
|
2009-07-29 22:40:18 +00:00
|
|
|
osd_WaitEventSet(msgInfo->WaitEvent);
|
2009-07-13 23:02:34 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2009-07-15 21:56:45 +00:00
|
|
|
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* VmbusChannelOnVersionResponse - Version response handler
|
|
|
|
*
|
|
|
|
* This is invoked when we received a response to our initiate contact request.
|
|
|
|
* Find the matching request, copy the response and signal the requesting
|
|
|
|
* thread.
|
|
|
|
*/
|
|
|
|
static void VmbusChannelOnVersionResponse(
|
|
|
|
struct vmbus_channel_message_header *hdr)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
2009-09-01 04:47:21 +00:00
|
|
|
LIST_ENTRY *anchor;
|
|
|
|
LIST_ENTRY *curr;
|
2009-08-18 22:21:19 +00:00
|
|
|
struct vmbus_channel_msginfo *msgInfo;
|
2009-08-26 22:16:04 +00:00
|
|
|
struct vmbus_channel_message_header *requestHeader;
|
|
|
|
struct vmbus_channel_initiate_contact *initiate;
|
2009-09-01 04:47:21 +00:00
|
|
|
struct vmbus_channel_version_response *versionResponse;
|
2009-07-15 21:56:45 +00:00
|
|
|
unsigned long flags;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_ENTER(VMBUS);
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
versionResponse = (struct vmbus_channel_version_response *)hdr;
|
2009-07-15 21:56:45 +00:00
|
|
|
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
ITERATE_LIST_ENTRIES(anchor, curr, &gVmbusConnection.ChannelMsgList) {
|
2009-08-18 22:21:19 +00:00
|
|
|
msgInfo = (struct vmbus_channel_msginfo *)curr;
|
2009-08-26 22:16:04 +00:00
|
|
|
requestHeader = (struct vmbus_channel_message_header *)msgInfo->Msg;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
if (requestHeader->MessageType ==
|
|
|
|
ChannelMessageInitiateContact) {
|
2009-08-26 22:16:04 +00:00
|
|
|
initiate = (struct vmbus_channel_initiate_contact *)requestHeader;
|
2009-09-01 04:47:21 +00:00
|
|
|
memcpy(&msgInfo->Response.VersionResponse,
|
|
|
|
versionResponse,
|
|
|
|
sizeof(struct vmbus_channel_version_response));
|
2009-07-29 22:40:18 +00:00
|
|
|
osd_WaitEventSet(msgInfo->WaitEvent);
|
2009-07-13 23:02:34 +00:00
|
|
|
}
|
|
|
|
}
|
2009-07-15 21:56:45 +00:00
|
|
|
spin_unlock_irqrestore(&gVmbusConnection.channelmsg_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:51:50 +00:00
|
|
|
/* Channel message dispatch table */
|
|
|
|
static struct vmbus_channel_message_table_entry
|
|
|
|
gChannelMessageTable[ChannelMessageCount] = {
|
|
|
|
{ChannelMessageInvalid, NULL},
|
|
|
|
{ChannelMessageOfferChannel, VmbusChannelOnOffer},
|
|
|
|
{ChannelMessageRescindChannelOffer, VmbusChannelOnOfferRescind},
|
|
|
|
{ChannelMessageRequestOffers, NULL},
|
|
|
|
{ChannelMessageAllOffersDelivered, VmbusChannelOnOffersDelivered},
|
|
|
|
{ChannelMessageOpenChannel, NULL},
|
|
|
|
{ChannelMessageOpenChannelResult, VmbusChannelOnOpenResult},
|
|
|
|
{ChannelMessageCloseChannel, NULL},
|
|
|
|
{ChannelMessageGpadlHeader, NULL},
|
|
|
|
{ChannelMessageGpadlBody, NULL},
|
|
|
|
{ChannelMessageGpadlCreated, VmbusChannelOnGpadlCreated},
|
|
|
|
{ChannelMessageGpadlTeardown, NULL},
|
|
|
|
{ChannelMessageGpadlTorndown, VmbusChannelOnGpadlTorndown},
|
|
|
|
{ChannelMessageRelIdReleased, NULL},
|
|
|
|
{ChannelMessageInitiateContact, NULL},
|
|
|
|
{ChannelMessageVersionResponse, VmbusChannelOnVersionResponse},
|
|
|
|
{ChannelMessageUnload, NULL},
|
|
|
|
};
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* VmbusOnChannelMessage - Handler for channel protocol messages.
|
|
|
|
*
|
|
|
|
* This is invoked in the vmbus worker thread context.
|
|
|
|
*/
|
2009-08-18 00:22:08 +00:00
|
|
|
void VmbusOnChannelMessage(void *Context)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
2009-08-20 19:11:26 +00:00
|
|
|
struct hv_message *msg = Context;
|
2009-08-26 22:16:04 +00:00
|
|
|
struct vmbus_channel_message_header *hdr;
|
2009-07-13 23:02:34 +00:00
|
|
|
int size;
|
|
|
|
|
|
|
|
DPRINT_ENTER(VMBUS);
|
|
|
|
|
2009-08-26 22:16:04 +00:00
|
|
|
hdr = (struct vmbus_channel_message_header *)msg->u.Payload;
|
2009-09-01 04:47:21 +00:00
|
|
|
size = msg->Header.PayloadSize;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_DBG(VMBUS, "message type %d size %d", hdr->MessageType, size);
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
if (hdr->MessageType >= ChannelMessageCount) {
|
|
|
|
DPRINT_ERR(VMBUS,
|
|
|
|
"Received invalid channel message type %d size %d",
|
|
|
|
hdr->MessageType, size);
|
2009-07-16 19:35:37 +00:00
|
|
|
print_hex_dump_bytes("", DUMP_PREFIX_NONE,
|
|
|
|
(unsigned char *)msg->u.Payload, size);
|
2009-07-15 19:48:29 +00:00
|
|
|
kfree(msg);
|
2009-07-13 23:02:34 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (gChannelMessageTable[hdr->MessageType].messageHandler)
|
|
|
|
gChannelMessageTable[hdr->MessageType].messageHandler(hdr);
|
|
|
|
else
|
2009-09-01 04:47:21 +00:00
|
|
|
DPRINT_ERR(VMBUS, "Unhandled channel message type %d",
|
|
|
|
hdr->MessageType);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-07-27 20:47:24 +00:00
|
|
|
/* Free the msg that was allocated in VmbusOnMsgDPC() */
|
2009-07-15 19:48:29 +00:00
|
|
|
kfree(msg);
|
2009-07-13 23:02:34 +00:00
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* VmbusChannelRequestOffers - Send a request to get all our pending offers.
|
|
|
|
*/
|
2009-08-18 00:22:08 +00:00
|
|
|
int VmbusChannelRequestOffers(void)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
2009-08-26 22:16:04 +00:00
|
|
|
struct vmbus_channel_message_header *msg;
|
2009-08-18 22:21:19 +00:00
|
|
|
struct vmbus_channel_msginfo *msgInfo;
|
2009-09-01 04:47:21 +00:00
|
|
|
int ret;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
DPRINT_ENTER(VMBUS);
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
msgInfo = kmalloc(sizeof(*msgInfo) +
|
|
|
|
sizeof(struct vmbus_channel_message_header),
|
|
|
|
GFP_KERNEL);
|
2009-07-13 23:02:34 +00:00
|
|
|
ASSERT(msgInfo != NULL);
|
|
|
|
|
2009-07-29 22:40:18 +00:00
|
|
|
msgInfo->WaitEvent = osd_WaitEventCreate();
|
2009-08-26 22:16:04 +00:00
|
|
|
msg = (struct vmbus_channel_message_header *)msgInfo->Msg;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
msg->MessageType = ChannelMessageRequestOffers;
|
|
|
|
|
|
|
|
/*SpinlockAcquire(gVmbusConnection.channelMsgLock);
|
2009-09-01 04:47:21 +00:00
|
|
|
INSERT_TAIL_LIST(&gVmbusConnection.channelMsgList,
|
|
|
|
&msgInfo->msgListEntry);
|
2009-07-13 23:02:34 +00:00
|
|
|
SpinlockRelease(gVmbusConnection.channelMsgLock);*/
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
ret = VmbusPostMessage(msg,
|
|
|
|
sizeof(struct vmbus_channel_message_header));
|
|
|
|
if (ret != 0) {
|
2009-07-13 23:02:34 +00:00
|
|
|
DPRINT_ERR(VMBUS, "Unable to request offers - %d", ret);
|
|
|
|
|
|
|
|
/*SpinlockAcquire(gVmbusConnection.channelMsgLock);
|
|
|
|
REMOVE_ENTRY_LIST(&msgInfo->msgListEntry);
|
|
|
|
SpinlockRelease(gVmbusConnection.channelMsgLock);*/
|
|
|
|
|
|
|
|
goto Cleanup;
|
|
|
|
}
|
2009-07-29 22:40:18 +00:00
|
|
|
/* osd_WaitEventWait(msgInfo->waitEvent); */
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
/*SpinlockAcquire(gVmbusConnection.channelMsgLock);
|
|
|
|
REMOVE_ENTRY_LIST(&msgInfo->msgListEntry);
|
|
|
|
SpinlockRelease(gVmbusConnection.channelMsgLock);*/
|
|
|
|
|
|
|
|
|
|
|
|
Cleanup:
|
2009-09-01 04:47:21 +00:00
|
|
|
if (msgInfo) {
|
2009-07-29 21:00:10 +00:00
|
|
|
kfree(msgInfo->WaitEvent);
|
2009-07-15 19:48:29 +00:00
|
|
|
kfree(msgInfo);
|
2009-07-13 23:02:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DPRINT_EXIT(VMBUS);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
/**
|
|
|
|
* VmbusChannelReleaseUnattachedChannels - Release channels that are unattached/unconnected ie (no drivers associated)
|
|
|
|
*/
|
2009-08-18 00:22:08 +00:00
|
|
|
void VmbusChannelReleaseUnattachedChannels(void)
|
2009-07-13 23:02:34 +00:00
|
|
|
{
|
|
|
|
LIST_ENTRY *entry;
|
2009-08-18 22:21:19 +00:00
|
|
|
struct vmbus_channel *channel;
|
|
|
|
struct vmbus_channel *start = NULL;
|
2009-07-15 21:57:16 +00:00
|
|
|
unsigned long flags;
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-07-15 21:57:16 +00:00
|
|
|
spin_lock_irqsave(&gVmbusConnection.channel_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
while (!IsListEmpty(&gVmbusConnection.ChannelList)) {
|
2009-07-13 23:02:34 +00:00
|
|
|
entry = TOP_LIST_ENTRY(&gVmbusConnection.ChannelList);
|
2009-09-01 04:47:21 +00:00
|
|
|
channel = CONTAINING_RECORD(entry, struct vmbus_channel,
|
|
|
|
ListEntry);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
if (channel == start)
|
|
|
|
break;
|
|
|
|
|
2009-09-01 04:47:21 +00:00
|
|
|
if (!channel->DeviceObject->Driver) {
|
2009-07-13 23:02:34 +00:00
|
|
|
REMOVE_ENTRY_LIST(&channel->ListEntry);
|
2009-09-01 04:47:21 +00:00
|
|
|
DPRINT_INFO(VMBUS,
|
|
|
|
"Releasing unattached device object %p",
|
|
|
|
channel->DeviceObject);
|
2009-07-13 23:02:34 +00:00
|
|
|
|
|
|
|
VmbusChildDeviceRemove(channel->DeviceObject);
|
|
|
|
FreeVmbusChannel(channel);
|
2009-09-01 04:47:21 +00:00
|
|
|
} else {
|
2009-07-13 23:02:34 +00:00
|
|
|
if (!start)
|
|
|
|
start = channel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-07-15 21:57:16 +00:00
|
|
|
spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags);
|
2009-07-13 23:02:34 +00:00
|
|
|
}
|
|
|
|
|
2009-07-27 20:47:24 +00:00
|
|
|
/* eof */
|